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
Sujesh RamachandranSujesh Ramachandran 

Send Attachment with more than 10MB to Other salesforce Instance via Rest API

Hi All,

 

I have to do a real time integration in which whenever a opportunity status become closed Status, I want to send that opportunity and account details to another salesforce instance. But I also have to send all the attachement of accounts.

 

I have used Rest API to send the details from salesforce to another salesforce. But end up in Apex heap limit as the attchment size is very big.

 

Could you please suggest me which approach will be feasible in this scenario?

 

Thanks,

sujesh

 

Sonam_SFDCSonam_SFDC

Hey Sujesh,

 

Just wondering if you got a chance to check Salesforce to Salesforce connections using partnernetworkConnection Class : http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_partnernetworkrecordconnection.htm

 

This will help you share records between SF Orgs in a simpler way where the record itself with be shared with attachments.

 

 

Sujesh RamachandranSujesh Ramachandran

Hi Sonam,

 

Thanks for the reply. I will look into the details of Salesforce to Salesforce Feature.

 

Mean while just checking with you like in my case whenever a Opportunity status become Closed, I want to send Opportunity details, Account and Account attachement to another salesforce org. In the detination org I will be creating a Lead with the details of opportunity from the source org and have to save all the Source Org Account Attachement into Lead Attachment.

 

Would this scenario will be possible via Salesforce to Salesforce feature?

 

Thanks,

Sujesh