6

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!');

}
6
  • Is there anything special about that trigger?
    – BarCotter
    Commented Jan 23, 2015 at 11:20
  • 1
    Nothing, just a System.debug('Whoop!');
    – dpk
    Commented Jan 23, 2015 at 11:21
  • 1
    Definitely seems weird! You couldn't boil the code down any more and this article doesn't mention S2S: salesforce.com/us/developer/docs/apexcode/Content/…
    – Force Hero
    Commented Jan 23, 2015 at 13:26
  • Yep, particularly considering I'm trying to implement a best practice: developer.salesforce.com/page/… ref "Reestablishing lookup relationships"
    – dpk
    Commented Jan 23, 2015 at 13:37
  • Something more meaningful might be System.debug('Size Trigger New = ' + Trigger.New.size()); or something along those lines. What you have now doesn't tell you if any new records were inserted. Knowing if Trigger.New was empty or not would tell you whether something had been inserted. In fact a boolean results test for being empty would be sufficient for your debug statement.
    – crmprogdev
    Commented Jan 23, 2015 at 13:54

1 Answer 1

2

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.

5

You must log in to answer this question.

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