Newer Version Available
Customize the TPM Calendar Launchpad
To customize the promotion hover content and buttons on the TPM calendar launchpad UI,
create a callable Apex class as a customization hook.
- Log in to your Salesforce org, and go to Developer Console.
- Create a global Apex class that implements the System.Callable interface.
-
Add the global call method with these
parameters.
- action: String. The behavior for the method to exhibit.
-
params: Map<String,Object>.
Arguments with these key value pairs.
- txId: String. ID of the transaction.
- promoId: Id. ID of the promotion record.
- promotionHoverContent: Object of type PromotionHoverContent. The PromotionHoverContent class exposes methods to access the UI elements and content on the promotion launchpad. For a list of all the exposed methods, see PromotionHoverContent Class.
-
To modify the content and the UI elements, use the methods exposed by the PromotionHoverContent class.
You can add a maximum of 4 attributes and 8 KPIs on a promotion launchpad.Here’s a sample Apex class that modifies the header content, adds attributes and KPIs, and sets the visibility of the edit button to false on the promotion launchpad.
- From Setup, in the Quick Find box, enter Custom Metadata Types, and then expand Custom Metadata Types.
- On the CGCloud Process Customization row, click Manage Records.
-
Click New, fill in these details, and then save your
work.
- Label: TPM_TradePlanning_PromotionHoverContent
- DeveloperName: TPM_TradePlanning_PromotionHoverContent
- Class: <Your Callable APEX Class>
- Method: call
- Enabled: Select the checkbox.
The Apex customization hook is enabled. The call
method updates the promotion launchpad on the trade calendar based on your custom
logic.