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.
Package (APACKCOD) |
Enter the package code. This code must be unique. This field is mandatory. |
Owner (AFACTORYOWN) |
Enter the name of the package owner. The owner is used in the repository structure to differentiate different sources. For example, Sage packages cannot be modified by developers outside of Sage. This field is mandatory. |
Package name (APACK) |
This field is automatically populated based on the owner and package code. You can edit this name, but you need to follow the naming convention: the name begins with @ and uses a / to separate the owner name from the package code. Part of the package name is used to generate the corresponding files in the JavaScript repository. For example, x3-sales. A valid package name must follow this convention: @xxx/yyy, where xxx is the package owner and yyy is the package name. Partner packagesTo prevent collisions in the root fields of the GraphQL schema, such as those caused by multiple packages sharing the same name, you must strictly follow the naming convention. This will keep each package's schema unique and prevent merging issues. The naming convention is as follows: @xxx/xxxyyy or @xxx/xxx-yyy, where xxx is the package owner and yyy is the package name. This field is mandatory. |
Description (ADES) |
Enter a short description for your package. |
Active (ENAFLG) |
Select this checkbox to activate the package. You can deactivate a package even if the module it is linked to is active. When a package is not active, it is still generated but not included in the GraphQL schema. As a result, the package cannot be used in the application. |
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.
Activity code (specific) (CODACT) |
Select a specific activity code to attach to your package. |
Description (ADES) |
This field displays the activity code's description. |
Type (TYPPACK) |
This field displays the activity code's type. |
Active (ENAFLG) |
This field indicates if the specific activity code is active or not. |
Available standard packages
The following table shows the standard Sage X3 packages and how they are organized and structured:
Package type |
Main packages |
Linking packages |
Main package for the module or activity code |
Sage X3 module |
Activity code |
Application
|
x3-finance |
|
Yes |
Financials |
|
x3-stock |
|
Yes |
Stock |
|
|
x3-manufacturing |
|
Yes |
Manufacturing |
|
|
x3-project-management
|
|
Yes |
Common data |
PJM |
|
x3-project-management-manufacturing |
|
Common data |
|
||
x3-project-management-stock |
|
Common data |
|
||
x3-purchasing
|
|
Yes |
Purchasing |
|
|
x3-purchasing-finance |
|
Financials |
|
||
x3-purchasing-sales |
|
Sales |
|
||
x3-purchasing-manufacturing |
|
Purchasing |
|
||
x3-sales
|
|
Yes |
Sales |
|
|
x3-sales-finance |
|
Financials |
|
||
x3-sales-stock |
|
Stock |
|
||
x3-sales-manufacturing |
|
Manufacturing |
|
||
x3-purchasing-sales |
|
Purchasing |
|
||
x3-sales-project-management |
|
Common data |
|
||
Shared |
x3-finance-data |
|
|
Common data |
|
x3-invoicing-data |
|
|
Common data |
|
|
x3-manufactruing-data |
|
|
Common data |
|
|
x3-master-data |
|
Yes |
Common data |
|
|
x3-physical-flows-data |
|
|
Common data |
|
|
x3-project-management-data |
|
|
Common data |
|
|
x3-purchasing-data |
|
|
Common data |
|
|
x3-sales-data |
|
|
Common data |
|
|
x3-stock-data |
|
|
Common data |
|
|
x3-structure |
|
|
Supervisor |
|
|
x3-system |
|
Yes |
Supervisor |
|
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 |