Promotion Class
Namespace
cgcloud
Example Implementation
cgcloud.TPM_Promotion tpmPromotion;
// When saving a promotion, a new MyRecord__c needs to be created
MyRecord__c myRecord = new MyRecord__c(Param1__c='Test');
// Append myRecord to the TPM_Promotion so it's committed when
// the Promotion is commited to the DB
tpmPromotion.append(myRecord);
TPM_Promotion Methods
The following are methods for TPM_Promotion.
global List<TPM_Promotion.Record> getAttachmentLinks
API Version
55
Signature
global List<TPM_Promotion.Record> getAttachmentLinks()
global TPM_Promotion
API Version
55
Signature
global TPM_Promotion()
global List<TPM_Promotion.Record> getAttachments
API Version
55
Signature
global List<TPM_Promotion.Record> getAttachments()
global List<TPM_Promotion.Record> getProductShares
API Version
55
Signature
global List<TPM_Promotion.Record> getProductShares(Boolean includeNew, Boolean includeDirty, Boolean includeDeleted )
global List<TPM_Promotion.Record> getAttachments
API Version
55
Signature
global List<TPM_Promotion.Record> getAttachments(Boolean includeNew, Boolean includeDirty, Boolean includeDeleted )
global List<TPM_Promotion.Record> getAttachmentLinks
API Version
55
Signature
global List<TPM_Promotion.Record> getAttachmentLinks(Boolean includeNew, Boolean includeDirty, Boolean includeDeleted )
global List<TPM_Promotion.Record> getTacticFunds
API Version
55
Signature
global List<TPM_Promotion.Record> getTacticFunds(Boolean includeNew, Boolean includeDirty, Boolean includeDeleted )
global List<TPM_Promotion.Record> getTacticFunds
API Version
55
Signature
global List<TPM_Promotion.Record> getTacticFunds()
global List<TPM_Promotion.TacticRecord> getTactics
API Version
55
Signature
global List<TPM_Promotion.TacticRecord> getTactics()
global List<TPM_Promotion.TacticRecord> getTactics
API Version
55
Signature
global List<TPM_Promotion.TacticRecord> getTactics(Boolean includeNew, Boolean includeDirty, Boolean includeDeleted)
global List<TPM_Promotion.Record> getTacticConditionCreationDefinitions
API Version
55
Signature
global List<TPM_Promotion.Record> getTacticConditionCreationDefinitions(Boolean includeNew, Boolean includeDirty, Boolean includeDeleted)
global List<TPM_Promotion.Record> getTacticConditionCreationDefinitions
API Version
55
Signature
global List<TPM_Promotion.Record> getTacticConditionCreationDefinitions()
global List<TPM_Promotion.Record> getProductShares
API Version
55
Signature
global List<TPM_Promotion.Record> getProductShares()
global Set<Id> getEffectiveCategories
API Version
55
Signature
global Set<Id> getEffectiveCategories()
global Set<Id> getEffectiveBrands
API Version
55
Signature
global Set<Id> getEffectiveBrands()
global TPM_ManualInputs getManualInputs
API Version
55
Signature
global TPM_ManualInputs getManualInputs()
global TPM_ParticipatingCustomers getParticipatingCustomers
API Version
55
Signature
global TPM_ParticipatingCustomers getParticipatingCustomers()
global TPM_ProductFilter getProductFilter
API Version
55
Signature
global TPM_ProductFilter getProductFilter()
global TPM_Promotion
API Version
55
Signature
global TPM_Promotion(Id promotionId)
global TPM_Promotion.Record append
API Version
55
Signature
global TPM_Promotion.Record append(SObject record)
Example
cgcloud.TPM_Promotion tpmPromotion;
// When saving a promotion, a new MyRecord__c needs to be created
MyRecord__c myRecord = new MyRecord__c(Param1__c='Test');
// Append myRecord to the TPM_Promotion so it's committed when
// the Promotion is commited to the DB
tpmPromotion.append(myRecord);
global TPM_Promotion.Record addTacticConditionCreationDefinition
API Version
55
Signature
global TPM_Promotion.Record addTacticConditionCreationDefinition(Tactic_Condition_Creation_Definition__c tccd)
global TPM_Promotion.Record addAttachment
API Version
55
Signature
global TPM_Promotion.Record addAttachment(Promotion_Attachment__c pa)
global TPM_Promotion.Record addAttachmentLink
API Version
55
Signature
global TPM_Promotion.Record addAttachmentLink(Promotion_Attachment_Link__c pal)
global TPM_Promotion.Record addProductShare
API Version
55
Signature
global TPM_Promotion.Record addProductShare(Promotion_Product_Share__c pps)
global TPM_Promotion.Record addTacticFund
API Version
55
Signature
global TPM_Promotion.Record addTacticFund(Tactic_Fund__c tf)
global TPM_Promotion.Record getRecordById
API Version
55
Signature
global TPM_Promotion.Record getRecordById(Id id)
global TPM_Promotion.TacticRecord addTactic
API Version
55
Signature
global TPM_Promotion.TacticRecord addTactic(Tactic__c tactic)
global TPM_Scenarios getScenarios
API Version
55
Signature
global TPM_Scenarios getScenarios()
global TPM_SubAccounts getSubAccounts
API Version
55
Signature
global TPM_SubAccounts getSubAccounts()
global void addRelationship
API Version
55
Signature
(TPM_Promotion.Record child, SObjectField relationField, TPM_Promotion.Record parent)
Example
cgcloud.TPM_Promotion tpmPromotion;
// When saving a promotion, a new MyRecord__c needs to be created linked to the
// Promotion__c record by the MyRecord__c.Promotion__c field (lookup or MD field)
MyRecord__c myRecord = new MyRecord__c(Param1__c='Test');
// Append myRecord to the TPM_Promotion so it's committed when
// the Promotion is commited to the DB
tpmPromotion.append(myRecord);
// Register the relationship to be resolved during the save
tpmPromotion.addRelationship(
myRecord, // The child record, our new record
MyRecord__c.Promotion__c, // The field that links both records, its a field on the child object
tpmPromotion.getPromotion() // The parent record, in this case, the Promotion record
);
global void registerWork
API Version
55
Signature
global void registerWork(TPM_Promotion.DoWork work)
global void reload
API Version
55
Signature
global void reload()
global void save
API Version
55
Signature
global void save()