Bewerken

Delen via


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.

AL method reference