I have a trigger on Event that gets called before update and after update. The trigger essentially computes the next meeting date and the last meeting date for each account related to that event (using eventrelation).

My problem is that this trigger is not being called when an EventRelation is inserted using data loader. The EventId of the EventRelation is set to the Event and the Event's WhoCount and LastModifiedDate are being updated accordingly but the update triggers are not be called.

Any ideas?

  • triggers fire on DML of the target object (Event) yet you are updating EventRelation. You need something that executes DML on the Event parent to cause its triggers to fire
    – cropredy
    Commented Aug 8, 2019 at 5:12

1 Answer 1


You can write a Trigger on EventRelationChange then go to Setup>Change Data Capture and enable the EventRelation Entity. Salesforce will "publish" an Event when any EventRelation record is Inserted, Updated or deleted (basically it insert a EventRelationChange record), that in turn calls your EventRelationChange Trigger which will have access to all the EventRelation fields. Better than using is a Schedulable/Batch convo.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .