Promotion Class
This APEX class provides programmatic access to the TPM Promotion SObject and it’s related SObjects.
The following are methods for TPM_Promotion.
-
global List<TPM_Promotion.Record> getAttachmentLinks
Returns the
List<TPM_Promotion.Record>instances with the Promotion Attachment Links contents. -
This method creates an empty Promotion record.
-
global List<TPM_Promotion.Record> getAttachments
Returns the
List<TPM_Promotion.Record>instances with the Promotion Attachments contents. -
global List<TPM_Promotion.Record> getProductShares
Returns a filtered
List<TPM_Promotion.Record>instances with the Promotion Product Share contents. -
global List<TPM_Promotion.Record> getAttachments
Returns a filtered
List<TPM_Promotion.Record>instances with the Promotion Attachments contents. -
global List<TPM_Promotion.Record> getAttachmentLinks
Returns a filtered
List<TPM_Promotion.Record>instances with the Promotion Attachment Links contents. -
global List<TPM_Promotion.Record> getTacticFunds
Returns a filtered
List<TPM_Promotion.Record>instances with the Tactic Fund contents. -
global List<TPM_Promotion.Record> getTacticFunds
Returns the
List<TPM_Promotion.Record>instances with the Tactic Fund contents. -
global List<TPM_Promotion.TacticRecord> getTactics
Returns the
List<TPM_Promotion.Record>instances with the Tactic contents. -
global List<TPM_Promotion.TacticRecord> getTactics
Returns a filtered
List<TPM_Promotion.Record>instances with the Tactic contents.. -
global List<TPM_Promotion.Record> getTacticConditionCreationDefinitions
Returns a filtered
List<TPM_Promotion.Record>instances with the Tactic Condition Creation Definitions contents. -
global List<TPM_Promotion.Record> getTacticConditionCreationDefinitions
Returns the
List<TPM_Promotion.Record>instances with the Tactic Condition Creation Definitions contents. -
global List<TPM_Promotion.Record> getProductShares
Returns the
List<TPM_Promotion.Record>instances with the Promotion Product Share contents. -
global Set<Id> getEffectiveCategories
Returns the read only list of effective categories of the promotion.
-
global Set<Id> getEffectiveBrands
Returns the read only list of effective brands of the promotion.
-
global TPM_ManualInputs getManualInputs
Returns a TPM_ManualInputs instance with the Manual Inputs Information.
-
global TPM_ParticipatingCustomers getParticipatingCustomers
Returns a TPM_ParticipatingCustomers instance with the Participating Customers information.
-
global TPM_ProductFilter getProductFilter
Returns the
TPM_ProductFilterinstance with the Product Filter information -
If promotionId is null, throw an exception. This method loads the Promotion record referenced by the input Promotion Id along with its related SObjects.
-
global TPM_Promotion.Record append
Appends a Custom SObject Record to the TPM_Promotion instance. This record will be inserted/updated/deleted (depending on the TPM_Promotion.Record instance state) during the same transaction the Promotion object is committed to the database.
-
global TPM_Promotion.Record addTacticConditionCreationDefinition
Adds a Tactic Condition Creation Definition Record to the promotion. The returned wrapper can be used for further operations.
-
global TPM_Promotion.Record addAttachment
Adds a Promotion Attachment Record to the promotion. The returned wrapper can be used for further operations.
-
global TPM_Promotion.Record addAttachmentLink
Adds a Promotion Attachment Link Record to the promotion. The returned wrapper can be used for further operations.
-
global TPM_Promotion.Record addProductShare
Adds a Promotion Product Share Record to the promotion. The returned wrapper can be used for further operations.
-
global TPM_Promotion.Record addTacticFund
Adds a Tactic Fund Record to the promotion. The returned wrapper can be used for further operations.
-
global TPM_Promotion.Record getRecordById
Returns the wrapper object for the record identified by the parameter id. It will search among all the records associated to the promotion.
-
global TPM_Promotion.TacticRecord addTactic
Adds a Tactic Record to the promotion. The returned wrapper can be used for further operations.
-
global TPM_Scenarios getScenarios
Returns a TPM_Scenarios instance with the Promotion Scenarios information.
-
global TPM_SubAccounts getSubAccounts
Returns a TPM_SubAccounts instance with the Sub Accounts information.
-
Notifies the TPM_Promotion instance about a relationship between 2 records. Avoid using direct DML manipulations for Records that are part of the transactional state of a Promotion. During the Promotion Save process, the records provided by the TPM_Promotion instances use temporary Id’s for records that are not still in the database. Using the methods provided by TPM_Promotion object ensures all relationships and Id’s are properly resolved before committing.
-
Adds work to be executed after the promotion is committed to the database. Use this method to perform additional operations after all the Promotion related records are correctly committed to the database. See TPM_Promotion.DoWork reference for details about the Interface methods.
-
Removes all the current values and reloads all the promotion data from the Database. This operation is disabled in the TPM_Promotion instance during the Save Promotion Customization Hook.
-
Saves the all the changes contained in promotion SObject record and it’s related SObject records. This operation is disabled in the TPM_Promotion instance during the Save Promotion Customization Hook, as this method will be automatically called when the Core business logic finish processing. The method will need to check the status of the TPM_Promotion.Record wrapper (isDeleted(), isNew()) to determine the DB operation to perform.
Returns the List<TPM_Promotion.Record> instances with the Promotion Attachment Links contents.
55
global List<TPM_Promotion.Record> getAttachmentLinks()
This method creates an empty Promotion record.
55
global TPM_Promotion()
Returns the List<TPM_Promotion.Record> instances with the Promotion Attachments contents.
55
global List<TPM_Promotion.Record> getAttachments()
Returns a filtered List<TPM_Promotion.Record> instances with the Promotion Product Share contents.
55
global List<TPM_Promotion.Record> getProductShares(Boolean includeNew, Boolean includeDirty, Boolean includeDeleted )
Returns a filtered List<TPM_Promotion.Record> instances with the Promotion Attachments contents.
55
global List<TPM_Promotion.Record> getAttachments(Boolean includeNew, Boolean includeDirty, Boolean includeDeleted )
Returns a filtered List<TPM_Promotion.Record> instances with the Promotion Attachment Links contents.
55
global List<TPM_Promotion.Record> getAttachmentLinks(Boolean includeNew, Boolean includeDirty, Boolean includeDeleted )
Returns a filtered List<TPM_Promotion.Record> instances with the Tactic Fund contents.
55
global List<TPM_Promotion.Record> getTacticFunds(Boolean includeNew, Boolean includeDirty, Boolean includeDeleted )
Returns the List<TPM_Promotion.Record> instances with the Tactic Fund contents.
55
global List<TPM_Promotion.Record> getTacticFunds()
Returns the List<TPM_Promotion.Record> instances with the Tactic contents.
55
global List<TPM_Promotion.TacticRecord> getTactics()
Returns a filtered List<TPM_Promotion.Record> instances with the Tactic contents..
55
global List<TPM_Promotion.TacticRecord> getTactics(Boolean includeNew, Boolean includeDirty, Boolean includeDeleted)
Returns a filtered List<TPM_Promotion.Record> instances with the Tactic Condition Creation Definitions contents.
55
global List<TPM_Promotion.Record> getTacticConditionCreationDefinitions(Boolean includeNew, Boolean includeDirty, Boolean includeDeleted)
Returns the List<TPM_Promotion.Record> instances with the Tactic Condition Creation Definitions contents.
55
global List<TPM_Promotion.Record> getTacticConditionCreationDefinitions()
Returns the List<TPM_Promotion.Record> instances with the Promotion Product Share contents.
55
global List<TPM_Promotion.Record> getProductShares()
Returns the read only list of effective categories of the promotion.
55
global Set<Id> getEffectiveCategories()
Returns the read only list of effective brands of the promotion.
55
global Set<Id> getEffectiveBrands()
Returns a TPM_ManualInputs instance with the Manual Inputs Information.
55
global TPM_ManualInputs getManualInputs()
Returns a TPM_ParticipatingCustomers instance with the Participating Customers information.
55
global TPM_ParticipatingCustomers getParticipatingCustomers()
Returns the TPM_ProductFilter instance with the Product Filter information
55
global TPM_ProductFilter getProductFilter()
If promotionId is null, throw an exception. This method loads the Promotion record referenced by the input Promotion Id along with its related SObjects.
55
global TPM_Promotion(Id promotionId)
Appends a Custom SObject Record to the TPM_Promotion instance. This record will be inserted/updated/deleted (depending on the TPM_Promotion.Record instance state) during the same transaction the Promotion object is committed to the database.
55
global TPM_Promotion.Record append(SObject record)
Adds a Tactic Condition Creation Definition Record to the promotion. The returned wrapper can be used for further operations.
55
global TPM_Promotion.Record addTacticConditionCreationDefinition(Tactic_Condition_Creation_Definition__c tccd)
Adds a Promotion Attachment Record to the promotion. The returned wrapper can be used for further operations.
55
global TPM_Promotion.Record addAttachment(Promotion_Attachment__c pa)
Adds a Promotion Attachment Link Record to the promotion. The returned wrapper can be used for further operations.
55
global TPM_Promotion.Record addAttachmentLink(Promotion_Attachment_Link__c pal)
Adds a Promotion Product Share Record to the promotion. The returned wrapper can be used for further operations.
55
global TPM_Promotion.Record addProductShare(Promotion_Product_Share__c pps)
Adds a Tactic Fund Record to the promotion. The returned wrapper can be used for further operations.
55
global TPM_Promotion.Record addTacticFund(Tactic_Fund__c tf)
Returns the wrapper object for the record identified by the parameter id. It will search among all the records associated to the promotion.
55
global TPM_Promotion.Record getRecordById(Id id)
Adds a Tactic Record to the promotion. The returned wrapper can be used for further operations.
55
global TPM_Promotion.TacticRecord addTactic(Tactic__c tactic)
Returns a TPM_Scenarios instance with the Promotion Scenarios information.
55
global TPM_Scenarios getScenarios()
Returns a TPM_SubAccounts instance with the Sub Accounts information.
55
global TPM_SubAccounts getSubAccounts()
Notifies the TPM_Promotion instance about a relationship between 2 records. Avoid using direct DML manipulations for Records that are part of the transactional state of a Promotion. During the Promotion Save process, the records provided by the TPM_Promotion instances use temporary Id’s for records that are not still in the database. Using the methods provided by TPM_Promotion object ensures all relationships and Id’s are properly resolved before committing.
55
(TPM_Promotion.Record child, SObjectField relationField, TPM_Promotion.Record parent)
Adds work to be executed after the promotion is committed to the database. Use this method to perform additional operations after all the Promotion related records are correctly committed to the database. See TPM_Promotion.DoWork reference for details about the Interface methods.
55
global void registerWork(TPM_Promotion.DoWork work)
Removes all the current values and reloads all the promotion data from the Database. This operation is disabled in the TPM_Promotion instance during the Save Promotion Customization Hook.
55
global void reload()
Saves the all the changes contained in promotion SObject record and it’s related SObject records. This operation is disabled in the TPM_Promotion instance during the Save Promotion Customization Hook, as this method will be automatically called when the Core business logic finish processing. The method will need to check the status of the TPM_Promotion.Record wrapper (isDeleted(), isNew()) to determine the DB operation to perform.
55
global void save()