Newer Version Available
Customize the TPM UI EARights
Enable the global editability and visibility of a promotion or tactic by modifying its
EARights.
- Log in to your Salesforce org, and go to Developer Console.
-
Create a global Apex class that implements the System.Callable interface.
-
Override the global call method that has these
parameters.
- action: String. The behavior for the method to exhibit.
- params: Map<String,Object>. Arguments to be used by the specified action. The object is of type List<EARightsAccess>. Each EARightsAccess instance has properties that you can modify. For information on this class, see EARightsAccess Class Reference.
Here’s the Apex class structure for the promotion and tactic EARights customization.
-
To modify the EARights associated with a promotion or tactic, edit the properties of
the associated EARightsAccess instance in the
respective Apex class. For a list of modifiable promotion and tactic EARights, see Modifiable Promotion and Tactic EARights.
Here’s a sample Apex class that modifies the EARights of the promotion edit button associated with an existing promotion.
- 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, complete these fields, and then save your work.
For promotion EARights customization, fill these details.
- Label: TPM_Promotion_EARightsAccess_Promotion
- DeveloperName: TPM_Promotion_EARightsAccess_Promotion
- Class: <Your Callable Apex Class for modifying the promotion EARights>
- Method: save
- Enabled: Select the checkbox.
For tactic EARights customization, fill these details.
- Label: TPM_Promotion_EARightsAccess_Tactic
- DeveloperName: TPM_Promotion_EARightsAccess_Tactic
- Class: <Your Callable Apex Class for modifyng the tactic EARights>
- Method: save
- Enabled: Select the checkbox.
The Apex customization hook is enabled. The call
method modifies the EARights of an existing promotion, or tactic based on your custom
logic.