0

I am designing to integration structure of our 3rd party system from and to Salesforce. It is about data integration and I am planning to have the Request & Response structure. In the triggers of Salesforce, I will use soap api to update our 3rd party system. And meanwhile, our 3rd party system will update Salesforce data via metadata API.

The issue with this is in the triggers, if the data is changed within the Salesforce org, I need to use Web service to update. But if the change is coming from Metadata API, I don't want to do that. Is there a way to distinguish that?

I searched the Apex class. It seems System.isBatch or System.isFuture can tell whether it is coming from a batch or job, but I don't see anything tell whether it is coming from Remote API. Is there any way I can achieve this?

2
  • What triggers do you think would fire from the metadata API? I don't believe any triggers would run from any metadata API calls?
    – sfdcfox
    Jun 20, 2016 at 3:39
  • @sfdcfox I didn't realize that. Will double check
    – Lance Shi
    Jun 20, 2016 at 3:43

1 Answer 1

0

I believe you want the trigger to fire only when the changes are made within salesforce only. Here is what I can think of:

1) Create a checkbox field in the object 
2) Send the request with additional parameter to set this checkbox to true 
3) In the triggers, use this checkbox to check if it is internal or from external system

Thanks!

You must log in to answer this question.

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