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
Mona KawaleMona Kawale 

How to Perform DML in 2 connected org at the same time?

I have connected 2 salesforce org using integration. Now If I want to insert records in one org , they should automatically get copied into another org. So how to achieve this?
SwethaSwetha (Salesforce Developers) 
HI Mona,
A similar ask was posted here(https://developer.salesforce.com/forums/?id=9060G000000I2sOQAS) in the past

The approach suggested in above post is 

"You can write a trigger on insert of a record in org1 that will call a webservice (callout). This webservice will insert a record in org2. 
Callout is a ASynchronous process where as Trigger is Dynamic / Synchrinous. That means it is not directly possible to do a webservice  callout from a triiger. 
But using @Future annotation we can convert the Trigger into a Asynchrinous Class and we can use a Callout method. "

If this information helps, please mark the answer as best. Thank you