How to change the owner to the default owner when transferring records from one org to another using SALESFORCE TO SALESFORCE?

How to change the owner to the default owner when transferring records from one org to another using SALESFORCE TO SALESFORCE?

ConnectionReceivedId is the ID of the PartnerNetworkConnection that shared record with your organization.

So, write a trigger on before insert that owner should be changed to default owner, when ConnectionReceivedId is not null.

Sample SOQL if Account object was connected:

SELECT Id, Name, 
ConnectionReceivedId
FROM Account

Leave a Reply