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
Vijay NagarathinamVijay Nagarathinam 

Sending large attachments to external system

Hi,

I am sending a large attachment from salesforce to an external system. While sending the attachments I am facing some issue, I am not able to send attachments size is greater than 12 MB, is there any possibility to send the attachments 12 MB?

Please let me know how to achieve this.

Thanks,
Vijay
Akhil AnilAkhil Anil
Hi Vijay,

That's not possible becuase apex has a heap size limit of 12 mb per transaction. So if you a try to send a data larger than that size your transaction will fail. You can look for workarounds like compressing the size of your attachment and then send it over.

Hope that helps !
Vijay NagarathinamVijay Nagarathinam
Is there any possibility using ajax web service callout to send larger files?

Thanks,
Vijay
NagendraNagendra (Salesforce Developers) 
Hi Vijay,

Yes, there is a limit from salesforce side for sending large size attachment.You can overcome this limit by using 3rd party storage server for storing the file content as well as sending them over the email with large size attachment.

Cloud Drop is One such App that is somewhat following the same logic in order to store any number and size of files that can be associated with any salesforce object with Rackspace server.It also allows the user to send very large size file as an attachment to particular contact/lead record.

Please check the following link for more information:
  • https://appexchange.salesforce.com/listingDetail?listingId=a0N30000003IzEDEA0
Mark this as solved if the information helps.

Regards,
Nagendra.
Vijay NagarathinamVijay Nagarathinam
Hi Nagendra,

I need to move the attachments from SF to the third party system. Is there any possibility without any app exchange application .
NagendraNagendra (Salesforce Developers) 
Hi Vijay,

May I suggest you to please check with below if this helps. Regards,
Nagendra.
Vijay NagarathinamVijay Nagarathinam
Thanks for your response Nagendra.!

I need to implement this logic without using any application. Any workaround for my issue...

Please let me know if you have any idea.

Thanks,
Vijay
mfawcettmfawcett
Did you find a solution to this ? I have the same issue.

Thanks

Miguel
DJ 367DJ 367
Hi @https://dfc-org-production.force.com/forums/ForumsProfile?communityId=09aF00000004HMG&userId=005F0000003FmvU&showHeader=false and https://dfc-org-production.force.com/forums/ForumsProfile?communityId=09aF00000004HMG&userId=005F0000003QSdf&showHeader=false ,

Did you find the solution. I got the same issue in my project. Thanks
mfawcettmfawcett
Based on what I have found there is not any solution or workaround when you reach the heap limit (12 MB). In my case, I need to move some content from Salesforce to a Content Management solution since those attachments are coming in an email and we know the source email address  I have created a Microsoft Flow so the attachment is moved via API to the content management and the email is saved in Salesforce. On the other hand, I was in touch with a guy from Mulesoft and it seems they have a solution but I did not try that.

 
Pradeep Gupta 18Pradeep Gupta 18
Hi, How can i transfer file from saleforce to external system? 
can it be done using Apex. Requirement is to extract data and send it to 3rd party server. 

Thanks
mfawcettmfawcett
@Pradeep Gupta 18 I followed this code http://enreeco.blogspot.com/2013/01/salesforce-apex-post-mutipartform-data.html hope it helps you. 
Ian Snead 7Ian Snead 7
https://www.thruinc.com/file-transfer-integration/salesforce/ solves file transfer limits for sfdc.
DJ 367DJ 367
No possibily you will not be able to send more than 12 MB. We had similar case and we end up sending large files from Salesforce to java to external system. By which we were able to send more than 1 GB files. However I do not recommend this solution.