In Salesforce there are 3 different Text Area fields:

Text Area, Text Area (Long), and Text Area (Rich).

I'm doing some processing in a custom class and I need to distinguish between the 3 different kinds. My first thought was using Describe but the Schema.DisplayType enum value for all three is simply TextArea.

1 Answer 1


This seems to work for short vs long: http://www.fishofprey.com/2011/03/find-length-of-salesforce-field-in-apex.html

When I test the following in my org:


I get 32000 back. When I try custom text areas, rich or not, I get the appropriate values back too. Doesn't indicate richness though. For that you can use .Description.isHtmlFormatted() which seems to return TRUE for rich and FALSE for plaintext.

You must log in to answer this question.

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