[SalesForce] et4ae5.triggerUtility.automate where Object name occurs twice

I need to create a Task Activity Apex trigger for use in Marketing Cloud Connect Triggered Sends.

Here is the standard Marketing Cloud connector trigger code:

trigger Trig_Activity on Task (after insert, after update) {
    et4ae5.triggerUtility.automate('Task');
}

Unfortunately another installed package also contains a Task Object.

enter image description here

How do I code the trigger to only select Activity Tasks?

Best Answer

The Task with the API name BMCServiceDesk__Task__c will not fire your trigger on the Salesforce Task object. So you don't need to worry about it. Even though there are two Task objects your trigger will only fire on the Salesforce Task object because your trigger is on that object.

trigger Trig_Activity on Task (after insert, after update) {
                          ^object the trigger is on

enter image description here

Long story short... What you have is correct and will work fine. :)

Related Topic