Method attributes
An attribute is a modifier on a method declaration that specifies information that controls the method's use and behavior. Adding an attribute on a method declaration is also known as decorating a method. For example, decorating a method with the Integration
attribute sets the method to be an event publisher. An attribute can have one or more arguments that set properties for the method instance.
In AL, attributes are placed before the method, and they have the following syntax:
[Attribute_Name(ArgumentName : data_type, ArgumentName : data_type)]
For example, the Integration
attribute has two arguments, and the syntax is:
[Integration(IncludeSender : Boolean, GlobalVarAccess : Boolean)]
Tip
If you already know the name of, for example, a data type, method, property, or trigger, use the Filter by title field in the upper left corner, above the table of contents to find the topic faster. Otherwise, you can scan the table of contents to find it.
See also
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應