Classes

A class defines a data structure that encapsulates the properties and behaviors of a specific entity, such as a customer, a general ledger entry, a product, or a sales order.

The Classes function (GESACLA) enables users to create and update classes. It populates dictionary tables and generates code via a validation function. Before a class can be used in code or visual representations, it needs to be validated. If validation fails, an error will be triggered during execution.

For further information, refer to the Developing with classes and representations documentation.

Prerequisites

Refer to the implementation documentation.

Screen management

The screen is defined in 7 tabs:

General tab

This tab provides general information about the class and includes two key grids:

Collections grid

This grid displays all collections managed within the class. Collection codes are assigned in the Properties tab and can refer to:

  • Simple properties that represent arrays of attributes. For technical reasons, a child class containing these properties is automatically generated. Its instance is named COLLECTION.

  • Child classes that define a collection of nested class instances.

A class can manage up to 100 collections.

Scripts grid

This grid lists all scripts associated with the class. Development partners can use the $METHODS and $PROPERTIES labels to insert custom code tied to supervisor events, particularly for CRUD operations (Create, Read, Update, Delete).

Methods tab

This tab defines additional methods and operations available on the class.

  • Operations: Executable in any context using an index code and key values to build the context it operates on. An operation can be called through a link in the interface from any page when the key values are provided. 

  • Methods: Require an existing context and operate on the current entity instance.

The Methods tab includes 3 grids:

  • Methods grid: Lists the methods and operations with their information.

  • Parameters grid: Displays the parameters for the selected method or operation.

  • Keys grid: Lists key segment parameters for the selected operation.

Standard methods tab

This tab describes the availability of the standard CRUD operations and any additional methods provided by the supervisor layer for this class.

Properties tab

This tab contains the 3 following grids:

  • The Properties grid lists the properties of the class.

  • The Parameters grid displays the parameters associated with the selected property in the Properties grid, if the property type requires additional parameters based on predefined rules. Entering values here is necessary to ensure the rule is executed correctly in context.

  • The Keys grid lists the key segments related to the selected property in the Properties grid, if the property type is linked to a table (version 6 technology) or a persistent class.

Mapping tab

This tab defines how CRUD operations (if available) are linked to the database tables for the main class instances and their child class instances. You can enter information only if the class is Persistent.

Miscellaneous tab

This tab provides additional information related to access rights. It includes the following elements:

  • Additional properties block: Displays the properties used for data access filtering on data managed by the class.

  • Filters grid: Defines additional filters that can be applied when the class is used to access only a subset of the data.

Specific buttons

Error messages

Other than the generic messages, the following error messages can appear when entering data:

Disabled representation

The representation is not valid and cannot be used because errors occurred during its last save.

Non-existent class

The class referenced in the representation does not exist.

Non-existent Table

The table referenced in the representation does not exist.

A technical or system class cannot be used in a representation

The referenced class is a technical or system class and cannot be used in a representation.

Disabled class

The class is inactive. For example, due to an associated activity code set to inactive.

X3 function not authorized

Sage X3 function codes used for triggering a Convergence link are only allowed in desktop representations, not in mobile or tablet representations.

Activity code $1$ associated with group $2$ is not of Sizing type.

Collections can only be sized using a Sizing activity code.

Value 0 impossible for representation classes.

Sizing a collection in a representation with an activity code equal to 0 is forbidden.

Mandatory field

A control is performed on a filter. The field is mandatory.

Impact of class modifications on representations

Changes made to a class can affect:

  • Representations that embed the class

  • Representations linked to a facet of those representations

When a representation is entered in the dictionary, these links can be automatically updated. In such cases:

  • A message displays to inform the user.

  • The user is prompted to save the updated representation.

Additionally, these links are also updated automatically when:

  • A patch is installed

  • The folder is revalidated

For further information, refer to the Developing with classes and representations documentation.

Tables used

Refer to the implementation documentation.