Skip to main content
Newcomer
Jan 20, 2025 1:18 PM UTC
Question

Getting error: JSON heap size limit exceeded while uplaoding document of 4.3 KB from Salesforce: At this line: myEnvelope = dfsle.EnvelopeService.sendEnvelope(myEnvelope, false);, this error is returned . Please suggest

Getting error: JSON heap size limit exceeded while uplaoding document of 4.3 KB from Salesforce: At this line:                 myEnvelope = dfsle.EnvelopeService.sendEnvelope(myEnvelope, false);, this error is returned . Please suggest 

2 replies

Docusign Employee
Jan 21, 2025 10:46 PM UTC

Hello Team

JSON heap size limit exceeded error in Salesforce occurs when the serialized envelope data exceeds the allowed limit.  DocuSign has file sze limitation https://support.docusign.com/s/articles/DocuSign-Document-and-Envelope-File-Size-Limitations?language=en_US this can result from a large document, excessive recipients, or redundant envelope data. To resolve it, ensure your document is properly encoded and minimal in size, streamline the envelope data by removing unnecessary fields or tabs, and use a `dfsle.EnvelopeDefinition` object to optimize the payload.  And If the issue persists, test with smaller payloads or contact DocuSign support for guidance with DocuSign API logs for further troubleshooting.

 

Thankyou

Sai

Translate
Newcomer
Sep 30, 2026 4:12 PM UTC

Hi Sai,

Can you please send me a link to refer this option - `dfsle.EnvelopeDefinition`, I can’t seem to find it - I was trying to create a custom apex class to optimize the payload. 

Thank you!

Regards,
Mrudula

Translate