Advanced Get Price
The Price Calculation feature offers a code snippet for calculating advanced pricing scenarios on Work Orders, particularly when entitlement is limited or a specialty price book need to be referenced. The Get Price button is updated with new enhancements linked to code snippet Code011: Advanced Get Price.
The Code011: Advanced Get Price code snippet offers the ability to pull pricing from a custom Service Pricebook, even if the Work Order is not entitled to a service contract with a service pricebook or labor pricing. This is a change from previous behavior, which would only acknowledge the org-wide standard pricebook if no Service Contract with pricebook was entitled. The pricing is instead generated based on a custom lookup field on the Work Order record, where the service pricebook is defined. For this functionality to work, you must configure a custom field and a global setting in the ServiceMax Setup.
For more information about the setting, see Parts Pricing Calculation with Work Order Assigned Pricebook.
For more information about the setting, see Labor Pricing Calculation with Work Order Assigned Pricebook.
* 
For custom SFMs, you must manually configure the new code snippet Code011: Advanced Get Price on the Page Properties of an SFM transaction.
From 24.1 release onward, the following OOTB SFMs are updated with the new code snippet Code011: Advanced Get Price by default.
Create Usage Lines from Estimates (TDM015)
Manage Work Order Lines - Usage (TDM016)
Manage Work Order Lines - Estimates (TDM017)
Capture Downtime(Capture_Downtime)
The following table provides code snippets available for the Get Price button.
Get Price Code Snippet
Behavior
Code001: Standard Get Price
The Get Price button is no longer configured with the code snippet Code001: Standard Get Price for all the OOTB standard SFMs in the org. However, for Get Price button on the pre-existing and custom SFMs, it is still available in the drop-down list on the Page Properties of an SFM transaction as an option.
* 
It is highly recommended to use the new code snippet Code011: Advanced Get Price for your custom SFMs as well to leverage the enhancements made to the price calculation feature.
Code011: Advanced Get Price
The Get Price button is configured with the new code snippet Code011: Advanced Get Price by default for all the OOTB standard SFMs available in the org. However, for the Page Properties on the custom SFMs, you must manually change the configuration for the Get Price button (or Page Events) and associate it with Code011: Advanced Get Price.
* 
To see a change in the configuration, you must perform Clear Cache after saving the SFM transaction designer and then launch the SFM.
Configuring Advanced Get Price
To configure the Advanced Get Price code snippet for custom SFMs:
1. Go to ServiceMax Setup > Service Flow Manager > Transaction Designer. The SFM transaction list view is displayed.
2. Edit an existing SFM and click the Layout Editor tab.
3. Click the Page Properties > Buttons on the right panel. The Page Properties section for buttons in the SFM is displayed.
* 
The same configuration can be done for Page Events in the SFM.
4. Expand the Button properties to locate the Get Price button.
5. Click the pencil icon on the Get Price button to edit the following fields.
Edit the title that appears on the button, if required.
Select Execute Javascript Code from the Button Click Action drop-down list.
Select Code011: Advanced Get Price from the Execute Javascript Code drop-down list.
Enable the Show in Web toggle button to display the Get Price button on the Web delivery, if required.
Enable the Show in Mobile toggle button to display the Get Price button on Mobile, if required.
6. Click Save.
Was this helpful?