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

Colouring the text in Formula field

Hi ,


   I have a requirement to show the text appearing in formula field in red colour . Is it achievable? The exact requirement is to show a auto Number type field in red if the Target Date field value is behind today's date. And the styling should be seen not only in detail page but also in search results. I am wondering if this could be achieved using formula field.


You can't do this in a formula field. The only thing you can do is to have an image - perhaps a red flag or something that shows in red. I've also done this with a formula field that displays static text (i.e., "This record has not yet been submitted for approval"). This was done by capturing an image of the text and using a formula field to display it. You can't do this with dynamic text unless you write a Visualforce page.