S2S: Trigger not firing on insert of new record?

When S2S inserts a new record (custom object) in the target org, the relevant trigger doesn’t appear to fire. The record is successfully inserted, there are no error emails received by the connection owner. It does fire when inserting a record directly in the target org.

Any ideas?

trigger MyCustomObjectTrigger on My_Custom_Object__c (after insert) {

     System.debug('Whoop!');

}

Answer

OK, the trigger is firing, it’s just that I don’t see a log entry on any of the monitored users, including the S2S Connection Owner user. Is there any way to monitor the logs generated by S2S actions?

BTW, I figured out it was firing by adding an:
insert new Contact(lastname='test trigger fired')

The Contact was created by “Connection User” and it’s not possible to monitor this user in the Debug Logs. Great.

Attribution
Source : Link , Question Author : dpk , Answer Author : dpk

Leave a Comment