Official Content

When defining calls, you may need to indicate explicitly if you are referring to an attribute, domain, object, etc.

Supported prefixes in GeneXus

att: Identifies an attribute.
dom: Identifies a domain.
obj: Identifies a callable object.
image: Identifies an image object.
type: Identifies a type, for the case of using a static method.



Look at the following Transaction Structure and the following event defined in some section of an object. There is a CustomerName attribute and a Procedure object named CustomerName, too



Event 'Gets Customer Name'

Note: This is an example to show the obj: prefix, but you can also give a better name to the Procedure (for example, ReturnsCustomerName).


The prefixes are used to avoid conflicts. You have to use them only if it is necessary.

In general, the prefixes aren't needed.

You could have an attribute and a picture with the same name and never obtain a conflict. The grammar has some rules to identify the type of expression automatically. For example, if you have an image object and an enumerated domain with the same name "xxx", and you write xxx.MethodName() GeneXus verifies that the method only applies to domains and resolves the issue without the necessity to explicit the "dom:" prefix.

Conflicts are most common when you set the "Allow non-standard functions" property to True. In this case, many of the resolutions of the automatic grammar does not count, because it is not known if xxx.yyy() refers to a standard expression or a non-standard expression. So, in these cases, you can use the prefixes to avoid conflicts.

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant