Enum exceptions

Enums in GraphQL are the equivalent of local menus or lists of values in Sage X3. They provide a standardized way to represent predefined values in your data model.

Some local menus cannot be directly translated into Enums. These must be handled using this Enum exceptions function (GESAENUMB).

Exceptions are required when:

  • The Enum must be included in a different package than the one associated with the local menu’s module.

  • The local menu description or values do not comply with GraphQL naming rules. For example, they contain special characters like %, >, =, ;.

How enums are generated

When a node binding record is validated:

  • Most existing local menus in Sage X3 tables are automatically converted into Enums in Sage X3 Services.

  • No additional setup is required.

  • The module defined for the local menu determines the package where the Enum is included.

Naming conventions

US English texts and local menu values are used to define the Enum.

Naming follows standard conventions:

  • PascalCase for Enum names

  • camelCase for Enum values

  • Enums simplify the use of local menus in GraphQL.
  • Most are auto-generated, but exceptions must be manually managed.
  • Follow naming conventions and use the Enum exceptions function (GESAENUMB) for special cases.

Enum extensions

A standard local menu can be extended with custom values to meet specific business needs. These customizations are known as enum extensions.

For detailed guidance on how to implement and manage Enum extensions, refer to the dedicated documentation.

Screen management

The screen is defined in 2 tabs:

  • The header

  • The List of values tab

This section outlines the key information for Enum exceptions.

List of values

This section displays the different messages related to the local menu.

Error messages

The only error messages are the generic ones.

Tables used

The following tables are implemented by the function:

Table Table description
AENUMBDGH [AENUMH] Enum binding header
AENUMBDGL [AENUML] Enum binding lines