Calculating True End Date and Subscription Term
Use JavaScript to make a Quote Line Calculator plugin that calculates values and stores maximum values for the custom quote line fields True Effective End Date and True Effective Term.
| Required Editions |
|---|
| Available in: Salesforce CPQ Winter ’16 and later |
-
On the quote line object, create the following custom fields.
- A date field with the API name True_Effective_End_Date__c
- A number field with the API name True_Effective_Term__c
-
Create a custom script record with a name of your choosing.
-
In the Quote Line Fields field, add
True_Effective_End_Date__candTrue_Effective_Term__c. -
In the Code field, provide Javascript code that exports all of the methods that the calculator looks for and documents their parameters and return types. Save your custom script and add its name to the Quote Calculator Plugin field in the Plugins tab of Salesforce CPQ package settings. We've provided a sample custom script below.
-