This Extension Point allows a script to be executed when ERP Pricing is performed, so that a custom implementation can be done instead of using the standard behavior.
Initial Setup
Upload the script file to the Groovy Script with the name “Simulate ERP Sales Order”. Please refer to Groovy Service Introduction - Uploading a New Groovy Script for more details of how to do this.
The usage of this script has to be enabled separately through a system setting. In Administration > Master Data Management > SettingBoolean, search for “Enable Custom Simulate ERP Sales Order” and set the Setting Value Boolean to Yes.
Additional Binding Variables
The following binding variable(s) are made available for this extension point, in addition to the common binding variables listed in Groovy Service Introduction - Common Binding Variables.
Variable Name |
Class |
Description |
---|---|---|
salesItemsTree |
SalesItemsTree |
Represents the Quote, it contains the functions that can be used to query the quote and its line items data as well as to modify them. |
quoteBO |
BusinessObject |
The quote business object |
uomCollection |
UnitOfMeasureCollection |
The POJO class having the information of the unit of measurement in the application. |
Expected Output
A Boolean value indicating whether the process encountered an error, i.e. True if there was any error, False if everything was successful.
Script Execution
The script that has been uploaded for this extension point will be executed automatically when the user clicked on the “ERP Pricing” button in a Quote, if the setting has been enabled.
If the “Enable Custom Simulate ERP Sales Order” setting is set to “No”, the standard implementation will always be used, even when there is a script uploaded to this extension point. If the “Enable Custom Simulate ERP Sales Order” is set to “Yes” but there is no script uploaded to this extension point yet, the action will fail, and the following error message will be displayed.