0

I have a record in my org for email which has html body greater than 384000 charters, when I manually copy this html body and paste in a new email then it gives error for not exceeding the body limit.

Also, when I try to create a email message record from backend using apex then it gives an error "String to large..". 

I don't know that how is this record created in Salesforce. So, my queries are:

  1. How this record could have been created when the html body character size is more than the allowed limit for this record.
  2. Is the html body limit different in Apex and the UI, because in apex I can see the html body limit is 128000 characters and while email creation I see a limit of 384000 characters.
  3. How can we create a record for email-message for HTML character size more than 384000.
2
  • The question I'm more interested in is what are you doing to hit this limit in the first place? Assuming the high end of average letters per word (7), even 128,000 characters would turn out to be over 18,000 words. That's enough to write a chapter-based book aimed at children between the ages of 7-11. I'd take this as an indication that you need to stop and consider the value of what you're trying to send via email. Surely you can't expect the recipient to read it all. Is all of the information you're sending necessary?
    – Derek F
    Apr 25, 2017 at 14:41
  • @DerekF, This email body is generated via HTML body of a email which forwarded multiple time and is present on case object. The text body isn't big, it is the html body which is this much big. Apr 25, 2017 at 15:08

1 Answer 1

0

Had the same issue, it's due to the fact that is an outbound email message in which case the limits are different (Limit is 384,000 char). For inbound email messages is 128000 like you mentioned.

Check this page for more info (Notes) https://help.salesforce.com/s/articleView?id=000386646&type=1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .