ActivityProcess
ActivityProcess is intended to manage custom CT CPG Activity records, as well as standard Event and Task records in case of using the Activity Sync functionality, according to the specified business logic.
API name in Salesforce: ActivityProcess
| Context | Method | Codename | Description |
|---|---|---|---|
after insert[ai] |
createRelatedData() |
createRD |
For the CT CPG Activity record, create the Activity Data records based on:
|
calculateFinishedActivity() |
calcFA |
Count the completed CT CPG Activities and fill in the CTCPG__ActialCalls__c field on the relayed Target Frequency record. |
|
storeObjectives() |
storeObj |
Copy the value from the CTCPG__NextCallObjective__c field of the CT CPG Activity record to the Objective record of the linked Account or Contact record. |
|
manageActivityShares() |
manageAS |
For the User record whose ID is specified in the CTCPG__UserId__c field of the CT CPG Activity record with the Joint Visit record type, grant access to this CT CPG Activity record based on the value in the CTCPG__IsJointActivityShareEnabled__c field of the Application Settings record. |
|
createRelatedActivities() |
createRA |
Create the related Event or Task record according to the parent CT CPG Activity record and the Activity Sync setting. |
|
after update[au] |
createRelatedData() |
createRD |
For the CT CPG Activity record, update the Activity Data records based on:
|
recalculateActivityActualCalls() |
calcActAC |
Recalculate the number of completed CT CPG Activities for the related Target Frequency record based on if the CTCPG__IsDone__c checkbox of the CT CPG Activity record is selected. |
|
storeObjectives() |
storeObj |
Update the Objective record of the linked Account or Contact record if the value from the CTCPG__NextCallObjective__c field of the CT CPG Activity record is changed. |
|
manageActivityShares() |
manageAS |
Update the access to the CT CPG Activity record with the Joint Visit record type if the User Id is changed in the CTCPG__UserId__c field of this CT CPG Activity record and based on the value in the CTCPG__IsJointActivityShareEnabled__c field of the Application Settings record. |
|
transferNextDateToChildrenVisit() |
transferNextDates |
Update the CT CPG Activity records that are created based on the parent CT CPG Activity record if the value in the CTCPG__NextCallDate__c field value is changed. |
|
modifyRelatedActivities() |
modifyRelatedAct |
Update the related Event or Task record in case of changing a value in the CTCPG__StartDate__c and/or CTCPG__EndDate__c field of the parent CT CPG Activity record and based on the Activity Sync setting. |
|
after delete[ad] |
recalculateActivityActualCallsAfterDelete() |
calcActAC |
Recalculate the value in the CTCPG__ActialCalls__c field on the related Target Frequency record if the counted CT CPG Activity records were deleted. |
before insert[bi] |
fillAccountAndContactFromReference() |
fillAAC |
|
fillObjectives() |
fillObj |
Copy the active Objective record related to the Account and/or Contact record to the CTCPG__Objective__c field of the linked CT CPG Activity record. |
|
fillMarketingCycle() |
fillCycle |
Link the CT CPG Activity record to the active Marketing Cycle record based on the User division and the Marketing Cycle Linking Settings record. |
|
fillTargetFrequency() |
fillTF |
Link to the Target Frequency record. |
|
before update[bu] |
fillObjectives() |
fillObj |
Copy the active Objective record related to the Account and/or Contact record to the CTCPG__Objective__c field of the linked CT CPG Activity record in case of changing the Account and/or Contact record. |
fillMarketingCycle() |
fillCycle |
Link the CT CPG Activity record to the active Marketing Cycle record based on changing a value in the CTCPG__StartDate__c field of the CT CPG Activity record in the User division and the Marketing Cycle Linking Settings record. |
|
fillTargetFrequency() |
fillTF |
Link the Target Frequency record if the Account and/or Contact record is changed and based on the value in the CTCPG__StartDate__c field of the CT CPG Activity record. |
|
before delete[bd] |
fillRelatedActivitiesIds() |
fillRA |
Delete related Event and Task records if the CT CPG Activity is deleted. |