Product Code and Description Automation

By | January 31, 2022

In Sage X3, we recently had a requirement to generate custom product code based on the product category, specifications selected by the user, and to generate product description based on the product code.

Screen path:
Miscellaneous tables:
Development – > Miscellaneous tables – > Definition
Development – > Miscellaneous tables – > Data
Window:
Development -> Script Dictionary-> Windows ->OITM

Based on the product categories we had several specifications for each product which users capture in other details tab on Product master. Using these specification we need to generate Product code and descriptions. For which we first created Miscellaneous table definition and in the Miscellaneous Data of each table we created the category code and the specifications related to that category.

New Stuff: How to repeat group header on each page in Crystal Reports

Other Details in product screen
Other Details in product screen
Miscellaneous table Data
Miscellaneous table Data

Once we created miscellaneous tables for all the specifications, we created a custom screen “Other details” which has all the fields of the specifications with the type as ADI.

Once all the specification is selected from the “Other Details” tab in the Product screen, on creation, the Product code and description gets generated. To get the code we will use the “Short description” column and for the description we will use the “Description” column present in the Miscellaneous table for each of that specification.

Once the code and description are fetched, we programmatically concatenate the code and description. For example, in the “Other Details” tab we have selected the specifications as per the below image.

Other Details Output after selection
Other Details Output after selection

Based on the specification selected we will get the Product Code and the Product Description

Generated Product Code and Product Description
Generated Product Code and Product Description

This way we generated Product code and description using Miscellaneous tables.