+ Start a Discussion
Vadivel MuruganVadivel Murugan 

Rich text area


I have create a rich text area custom field. In this field allow to image also. Then how to check the rich text area is null or not when image is displayed. Any one know reply it.
Abhishek BansalAbhishek Bansal
Hi Vadivel,

Where do you want to check the value of this rich text area.
In validation rules or triggers or custom VF page controllers.
Please specify.

Prashant WayalPrashant Wayal
Hi Vadivel,

To check if rich text area field is null or blank, you have calculate it's length and check if length == 0.
For ex. If you have fieldName as "RichTextArea__c" then you have to check it's length as 
RichTextArea__c.trim().length == 0.

Hope this helps you.

Thank you,