Promotion Class
Namespace
1cgcloudExample Implementation
1cgcloud.TPM_Promotion tpmPromotion;
2
3// When saving a promotion, a new MyRecord__c needs to be created
4MyRecord__c myRecord = new MyRecord__c(Param1__c='Test');
5
6// Append myRecord to the TPM_Promotion so it's committed when
7// the Promotion is commited to the DB
8tpmPromotion.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
1cgcloud.TPM_Promotion tpmPromotion;
2
3// When saving a promotion, a new MyRecord__c needs to be created
4MyRecord__c myRecord = new MyRecord__c(Param1__c='Test');
5
6// Append myRecord to the TPM_Promotion so it's committed when
7// the Promotion is commited to the DB
8tpmPromotion.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
1cgcloud.TPM_Promotion tpmPromotion;
2
3// When saving a promotion, a new MyRecord__c needs to be created linked to the
4// Promotion__c record by the MyRecord__c.Promotion__c field (lookup or MD field)
5MyRecord__c myRecord = new MyRecord__c(Param1__c='Test');
6
7// Append myRecord to the TPM_Promotion so it's committed when
8// the Promotion is commited to the DB
9tpmPromotion.append(myRecord);
10
11// Register the relationship to be resolved during the save
12tpmPromotion.addRelationship(
13 myRecord, // The child record, our new record
14 MyRecord__c.Promotion__c, // The field that links both records, its a field on the child object
15 tpmPromotion.getPromotion() // The parent record, in this case, the Promotion record
16);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()