0

So I know about text areas and rich text areas (extraTypeInfo). But a customer has some custom fields which are string types but with htmlFormatted = true returned in metadata. Looks like this is just an HTML fragment, fairly similar to the rich text areas.

But I am not sure how to create such a custom field for testing

1 Answer 1

2

This is covered in the Apex field describe documentation

isHtmlFormatted()

Returns true if the field has been formatted for HTML and should be encoded for display in HTML, false otherwise. One example of a field that returns true for this method is a hyperlink custom formula field. Another example is a custom formula field that has an IMAGE text function.

Since these are formula fields, you can't mock their values, only fetch via SOQL after an object is saved or use mySobj.recalculateFormulas() (although, see limitations)

1
  • Yep I figured this out using the HYPERLINK method. Thanks for responding
    – MJB
    Commented Aug 26, 2016 at 15:52

You must log in to answer this question.

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