How to customize non-transient pages
Less than to read
Customizing non-transient pages involves creating a page and adding custom fields.
These custom fields are contained in a node extension. The node extension is included as part of the entire node payload submitted by the framework to the Sage X3 API.
If the mapping on the API operation has custom properties, then it will be used.
This page details the general steps to customize a non-transient page with TypeScript.
Create a page extension
Under the directory page-extension, located inside the lib folder, create a new TypeScript file. Write the code in TypeScript for the page extension, in the newly created file.
Read more about creating a page extension here.
Add custom fields
Inside the page-extension file you created, add the custom fields.
The code shown below demonstrates how to add the fields of the header to the customizationMiscellaneousReceiptHeaderBlock
block:
Add the fields of the line to the customizationMiscellaneousReceiptLinesBlock
block:
After the TypeScript code is written, build your package. To build a package, you need to compile and run it. You can do this in the terminal, by running npm run build
then npm run start
.