This Extension Point allows a script to be executed upon creation of a new Quote, for example, to set default values for certain fields.
Initial Setup
Upload the script file to the Groovy Script with the name “Post Quote Creation”. Please refer to Groovy Service Introduction - Uploading a New Groovy Script for more details of how to do this.
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. |
accountInfo |
AccountInfo |
The basic data about the Account, including its address data. |
userInfoList |
Set<UserInfo> |
The list of all Users in the system. |
sourceQuotePFRecords |
Set<PartnerFunctionRecord> |
The list of Partner Function Records in the quote. If the script is triggered due to the quote copy action, this variable will be populated with information about the partner functions of the source quote. |
accountPFRecords |
List<PartnerFunctionRecord> |
The list of Partner Function Records for the account of the quote. |
Expected Output
N.A.
Script Execution
The script that has been uploaded for this extension point (if any) will be executed automatically when a new Quote is created, both when the Quote is created from scratch and when it is copied from an existing Quote. If the salesItemsTree variable has been used to modify the Quote data in the script, the changes will be applied to the quote.
If no script has been uploaded for this extension point, then the default action will be to automatically add the default Partner Functions as defined in the Account linked to the Quote.
If the script is provided for this extension point, this default behavior will not be executed. Thus, the script has full flexibility to perform the same default behavior or provide its own custom logic for setting these defaults or to not set any default at all. To perform the default behavior, the script only must call the following function:
…
groovyCtxUtil.setDefaultPartnerFunctions(salesItemsTree);
…
Comments
0 comments
Article is closed for comments.