Packages
Use this function to access the standard Sage packages and create custom packages.
Packages are node modules that group features into consistent chunks, like how modules are structured in Sage X3.
There is no direct one-to-one correspondence between Sage X3 modules and Sage X3 Services packages. The structure of node packages supports dependencies but prevents circular references, meaning a chain of dependencies that forms a closed loop is not allowed.
Sage X3 Services packages consist of main packages and linking packages. Linking packages act as intermediaries between main packages and their dependencies, or as collections of shared resources.
Screen management
The screen is defined in 3 tabs:
-
The header,
-
The General tab,
-
The Activity code (specific) tab.
Header
This section outlines the key information for packages.
General tab
In this section, you can configure the various links associated with the package.
Module (MODULE) |
Enter the related Sage X3 module. This field is mandatory, as all packages must be attached to a Sage X3 module. |
Activity code (CODACT) |
Use this field to attach a main activity code to the package. This code is also used for extracting patches. If the activity code is disabled, packages linked to it are not generated, and you can't attach a new data model to the package. This field is optional. |
Type (TYPPACK) |
Select one of the following package types.
|
Linking package (LINKINGPACK) |
You can select this checkbox only for applicative packages.
Example
The purchase order number (POHNUM) is declared as a node extension of the sales order node (SORDER) in the x3-purchasing-sales linking package. It is important to follow this development rule to maintain fully independent packages. For example, you can disable the x3-purchasing package and all its properties, including its extensions in the x3-sales package, while keeping functional separation. Furthermore, the x3-purchasing-sales package includes the sales order category (SOHCAT) also used in the purchase order node.
You cannot link linking packages to other linking packages or shared packages. Only main applicative packages can be linked.
|
Main package for module/activity code (MAINPACK) |
Select this checkbox to declare a reference package for a module and an activity code. If selected, this package is used as a reference by the API code generator to host the enums files (Sage X3 local menus linked in Sage X3 to a module). It is possible to create multiple packages for a module, but only one can be defined as the reference. |
Link between (LINKPACK1 and LINKPACK2) |
You can edit this section only if the Linking package checkbox is selected. Select the 2 packages linked by the newly created package. For example, for the PURCHASING_SALES package, the link is between @sage/x3-purchasing and @sage/x3-sales. |
Activity code (specific) tab
In this section, you can link specific activity codes to a package.
Standard activity codes do not require any setup in the Packages function (GESAPACK). They are automatically generated in the x3-system package if they are used in an API.
However, specific activity codes (starting by X, Y or Z) must be linked to a package to be generated.
Available standard packages
The following table shows the standard Sage X3 packages and how they are organized and structured:
Standard packages are located in the /application or /shared directories within Sage X3 Services, and in the node-modules/@sage directory within Sage X3 Builder.
Custom and add-on packages are generated in the /application/@[YourNameSpace] or /shared/@[YourNameSpace] directories within Sage X3 Builder Developer Studio, where [YourNameSpace] is the namespace you choose for your packages.
Error messages
The only error messages are the generic ones.
Tables used
The following tables are implemented by the function:
Table | Table description |
APACKAGE [APACK] | Package name (API) |
APACKACV [APACACV] | Activity code for packages |