Create an add-on package
Less than to read
Add-ons in Node.js technology are included in packages that identify an added feature.
You can create as many packages as you need. These packages can be related to each other or not. It is recommended that these packages be related to your activity codes.
To customize or extend X3, you must create a new package. You cannot add resources inside standard Sage packages.
Let’s build a new package called XEImpact. This will also be the name of the add-on.
Note: The same naming convention is applied to the custom package names as for other custom elements of the Sage X3 dictionary. Therefore, they must start with with an X, Y, or Z. This is why the new package name starts with an X.
For this example, the developer company is called OneTinyPlanet, and our root domain is OneTinyPlanet.com. This is used as the scope for our add-on.
Using your root domain or any of its subdomains assures your namespace is not used anywhere else.
There are other ways to make your scope unique. You can publish your packages to the npm registry, or use GitHub usernames or organization names as namespaces.
Let’s create the package XEImpact. The package is created in Development > Data and parameters > API:
The package is defined as the main package for the module and activity code used in the example. This places the package as the “boss” in the hierarchy of packages for the add-on.