+ Start a Discussion
mat_tone_84mat_tone_84 

trigger can access to other organization without salesforce connector?

It is possibile to create a trigger in "after update" that login to other organization with user e pass and update a field in the other our organization.
I don't want to use salesforce to salesforce connector.
Anyone can suggest me a way to do this?
thanks
BalajiRanganathanBalajiRanganathan
Yes, if you have a user name and password, you can try using Salesforce REST API. Refer the below URL to call out the Salesforce Rest API Using Apex.

https://developer.salesforce.com/forums/ForumsMain?id=906F00000009ACSIA2
 
James LoghryJames Loghry
To add on to balaji's post,

You will need to invoke a future method from your trigger, which will allow you to perform a callout.  (See here: https://developer.salesforce.com/page/Apex_Web_Services_and_Callouts)

From that method you can invoke a REST api callout, or a soap API callout to another Salesforce org, provided you have the user's username, password, security token (or an oauth token) on the external org.

Additionally, another way you could accomplish this is a middleware tool that polls Salesforce for data, and then pushes it to a seperate Salesforce org.