Skip to main content

Return to TX Community

Liaison

Events Triggers

A Trigger is a section of code executed before or after inserting or modifying a Salesforce record based on a condition provided. There are different types of triggers based on the actions to be performed. Listed below are the triggers available in the TargetX Events package:

 
ContactScheduleItemTrigger
Trigger/Class ContactScheduleItemTrigger
Object Contact Schedule Item
Type     before insert, before update, before delete, after insert,  after update, after delete, after undelete
Description This trigger serves a number of functions
Affects ContactScheduleItem__c
How affected
  • Marks ‘Is_Guest__c’ if appropriate
  • Sends out applicable CSI emails
  • Adds events to staffer Salesforce calendars
  • Runs waitlist logic
  • Updates guest counts
  • Re-parents CSIs
  • Cancels appointment type Org Events
Criteria
  • Marks ‘Is_Guest__c’ if ‘Guest_Of__c’ field populated
  • Email sent varies based on CSI status (confirmed, cancelled, etc)
  • SF events are created if a staff CSI is created for an Org Event that’s marked ‘Copy to SF calendar
  • Waitlist logic is run when a CSi is moved from Confirmed to Cancelled
  • Guest counts are updated on CSIs if one of the guests’ CSIs is cancelled
  • CSIs are re-parented if only the main CSI is cancelled, but guest CSIs remain confirmed
  • If one of the CSIs associated to an Appointment type Org Event is cancelled, the Appointment is cancelled
Custom Setting N/A
Custom Setting Description N/A
Package Version 5.26 - Current
EventTrigger
Trigger/Class EventTrigger
Object Parent Object - Event
Type     before insert, before update, before delete, after insert,  after update, after delete, after undelete
Description Does two things:
  • Used to create a recurring series of events when setting up recurring Org Events
  • Cancels associated Appointment type Org Event when the associated Salesforce event is deleted
Affects Event, OrgEvent__c
How affected
  • Creates the series of OrgEvents when creating a recurring OrgEvent. Salesforce events are either kept or deleted depending on the value of the ‘Copy to SF calendar’ checkbox on the OrgEvent
  • Checks ‘Cancelled’ on an associated Appointment type OrgEvent
Criteria
  • Recurring OrgEvent created
  • Appointment type OrgEvents’s corresponding SF event deleted
Custom Setting N/A
Custom Setting Description N/A
Package Version 5.26 - Current
 
OrgEventTrigger
Trigger/Class OrgEventTrigger
Object Parent Object - Organization Event
Type     before insert, before update, before delete, after insert,  after update, after delete, after undelete
Description This trigger serves a number of functions
Affects OrgEvent__c, Event, Account, ContactScheduleItem__c
How affected
  • Sets the timezone adjusted field on the OrgEvent used for display in certain places
  • Sets the registration deadline based off the ‘Registration Deadline Days’
  • Syncs data to the Salesforce calendar
  • Updates Accounts’ next school visit events
  • Sends event rescheduled/cancellation emails
  • Runs waitlist logic
  • Deletes sub events when primary event is deleted
Criteria  
Custom Setting ‘Next School Visit Trigger Enabled’ affects whether or not accounts will be updated
Custom Setting Description  
Package Version 5.26 - Current
postUpdatePaymentDetail
Trigger/Class postUpdatePaymentDetail
Object Parent Object - Payment Detail
Type     After update
Description Marks a CSI as confirmed when the associated payment detail record is marked
Affects ContactScheduleItem__c
How affected Marks Fee_Paid__c field when applicable
Criteria Payments updates a payment detail related to a CSI record
Custom Setting N/A
Custom Setting Description N/A
Package Version 4.24 - Current
  • Was this article helpful?