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
MasieMasie 

'String Too Long Error' on Rich Text Area field

Hi 

I have a trigger that records the old value of a rich text area field but I am getting the following error when an update is done.

caused by: System.DmlException: Insert failed. First exception on row 3; first error: STRING_TOO_LONG, Old Value: data value too large (max length=220)

Is there a way to increase this?


Ramu_SFDCRamu_SFDC
I suspect that the rich text max length is set to 220 in the field definition hence it is throwing an error. Please verify this.
Bhawani SharmaBhawani Sharma
2 Options:
1. Increase your field length from 220.
2. Truncate the value upto 220 characters before putting in field.
MasieMasie
Hi Bhawani

I like option 1 :) may I ask how I could do this?
Bhawani SharmaBhawani Sharma
Go to ypur Rich Text area field and click on edit button. In the length  field, increase the length from 220 to 1000 or whatever you like.
MasieMasie
That is the first thing I checked it is set to 32,768
Bhawani SharmaBhawani Sharma
Please mark teh question closed if this has been resolved. Regards, Bhavi Sharma Certified Salesforce Consultant bhavi@simplyforce.com/bhawani.sh.sharma@gmail.com +91-9928130589 LinkedIn | Twitter | Blog | Community www.simplyforce.com
MasieMasie
Bhawani this did not solve my problem, even through my field leght is set at 32 768 charachters I am getting the max lenght error.
Bhawani SharmaBhawani Sharma
Same error?
MasieMasie
Yes the same error 
Bhawani SharmaBhawani Sharma
​Are you sure you are updating length of correct field? ​​