Newer Version Available
Apex Save Process Customization
This section provides information on the different workflow process to customize the
save process using APEX calls.
- Change a Managed Package SObject field
value.
- Delete a Managed Package SObject
record.
- Add custom SObject to Promotion Save.You can add additional SObjects to be saved during the promotion SObjects database commit.
The TPM_Promotion class ensures all promotion related SObjects are committed on an all or none fashion while encapsulating all operations in a transaction. Since the hook will be called from multiple places in multiple TPM processes, the best practice is to use the provided methods for handling custom records and relationships to ensure no incomplete or invalid data is committed. The SObject write order for your custom sobject records are determined by the order of the append calls.
- Add custom SObject to Save with
Relationship.
- Save Custom Data in TPM UI.Save the custom data that was sent for save along with the Promotion data.In your callable class, you can access the custom state that was set as part of the promotion state.