function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

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?
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.
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:

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.