Creating the CT CPG Activity and CT CPG Activity Data Records
The following Apex classes are used to create a record of the custom CT CPG Activity object and a related record of the custom CT CPG Activity Data object:
-
ActivityProcessHandler
-
GlobalActivityService
The Apex classes are invoked by the following Apex trigger:
-
ActivityProcess
| Before implementing, the system checks that the ActivityProcess trigger has a corresponding record in Trigger Settings. |
A trigger is invoked by operations on recurring events.
The ActivityProcessHandler Class
The following trigger methods of the ActivityProcessHandler class are implemented:
| You can restrict one or more trigger events to not invoke the trigger methods. |
| ActivityProcessHandler Method | Execution |
|---|---|
onBeforeInsert |
|
onBeforeUpdate |
For the CT CPG Activity record:
|
onBeforeDelete |
Search and delete the standard Event and Task records that are related to deleted CT CPG Activity records. |
onAfterInsert |
|
onAfterUpdate |
|
onAfterDelete |
When the CT CPG Activity records are removed, recalculate the finished activities in the Actual Calls field of the corresponding Target Frequency record. |