When calling getDescribe()
on a custom field I get the field data.
Although, I need to know when the field is Text Area (Long)
, Text Area (Rich)
or just TextArea
.
When seeing the result from salesforce all of them have the same type TextArea
without difference between each other.
Is that how it should work?
Is there a way I can differ between those three field types?
Best Answer
Looks like theres 3 methods you can use to check the definition of a textarea:
field.getType() == Schema.DisplayType.TEXTAREA
field.isHtmlFormatted()
field.getLength()
Here's a snippet of these methods in use: