Newer Version Available

This content describes an older version of this product. View Latest

Apex Save Process Customization

This section provides information on the different workflow process to customize the save process using APEX calls.
  1. Change a Managed Package SObject field value.
  2. Delete a Managed Package SObject record.
  3. 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.

  4. Add custom SObject to Save with Relationship.
  5. 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.

    This state is serialized. Deserialize it before being able to access the data.

    Note