A class is the description of a data structure managing an entity (for example a customer, a general ledger entry, a product, a sales order, and so forth).

The Classes function allows users to create and update classes. It feeds dictionary tables and also generates code through a validation function. A class must be validated in order to be used in the code or in a representation. If a class is not valid, an error will be triggered upon execution.

Prerequisites

SEEREFERTTO Refer to documentation Implementation

Screen management

Header

Tab General

This tab displays the class general information.

This tab contains the following grids:

Collections grid

The Collections grid describes all the collections managed in the class. The collection code is assigned in the Properties tab:

    • To simple properties that describe an array of properties. For technical reasons, a child class containing all the properties will be created. The instance of this class will be called COLLECTION.
    • To a child class that describes a collection of child classes.

Scripts grid

The Scripts grid is a list of scripts in which "$METHODS" and "$PROPERTIES" labels are available for the development partners who will add their own code associated with supervisor events (especially for CRUD management).

Tab Methods

This tab defines the additional methods and the operations available on the class. The difference between an operation and a method is as follows:

Operation

An operation can be run in any context and needs an index code and key value to build the context it operates on. An operation can be called through a link in the interface from any existing page when the key values are provided. 

Method

A method works only if a context exists. It will only operate on the current entity instance.

This tab contains the following grids:

Methods grid

The Methods grid lists the methods and operations, and their corresponding information.

Keys grid

The Keys grid lists the key segment parameters associated with the current operation in the previous grid.

Parameters grid

The Parameters grid lists the parameters associated with the current method or operation in the previous grid with their corresponding information.

Tab Standard methods

This tab describes the availability of the standard CRUD method and other methods supported by the supervisor layer on the class.

Tab Properties

This tab contains the following grids:

Properties grid

The Properties grid lists the properties of the class.

Keys grid

The Keys grid lists the key segments corresponding to the line selected in the Properties grid (if the property type is linked to a table [version 6 technology] or to a persistent class).

Parameters grid

The Parameters grid lists the parameters of a property, depending on the selected line in the Properties grid, if the type of property has rules requiring additional parameters. Entering a value will then be required to call the rule with the correct parameters based on the context.

Tab Mapping

This tab defines how the CRUD operations, if they exist, are linked to the database tables for the main instances of the class, and the instances of child classes. You can enter information only if the class is Persistent.

Tab Miscellaneous

This tab defines additional information dedicated to access rights.

This tab contains the following grids:

Properties grid

The Dedicated properties grid displays the properties used for data access filtering on data managed by the class.

Filters grid

The Filters grid defines additional filters that can be selected when the class is used to access only a sub-set of the data managed by the class.

History grid

The History grid contains information to ensure compatibility with the version 6 code for data access restrictions.

Specific buttons

Tree structure

This button can be used to show a window displaying the tree structure of the class.

Validation

This button performs the validation of the class, which also:

  • Checks the global consistency of the class description.
  • Generates the code of the class (properties, methods and operations ) in a "C_class.stc" script, where class is the code of the class.
  • Generates the code of additional Sage X3 scripts where the business logic associated with the CRUD operation supports as well as the event calls are coded.

SEEWARNINGThe generated program must not be modified as it will be automatically recreated during validation.

Copy

Error messages

In addition to the generic error messages, the following messages can appear during the entry :

Disabled representation

The representation is not valid and cannot therefore be used, because other errors occurred when the representation was saved.

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 class referenced by the representation cannot be used.

Disabled class

The class is not active (for instance because there is an activity code on it that has been set to inactive).

X3 function not authorized

X3 functions code used for triggering a Convergence link: can only be present on Desktop representations and not on Mobile and Pad representations.

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

The activity code used to size collections must be 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.

Additional information

Note that the modifications on the class can have an impact not only on the representations embedding the class, but also on the representations that have a link on a facet of these representations. The entry of a representation in the dictionary can thus trigger an automatic update of the links. In that case, a message is displayed and the user is invited to save the updated representation. The link on the representations is also automatically done when a patch is installed or the folder is revalidated.

Tables used

SEEREFERTTO Refer to documentation Implementation