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

Need urgent help to display value in blue color

i have an apex class and i need to display one text field in blue color. can any one tell me how we can acheive this. if it's page we can go with style and color. but how we can do it in class..


 if(ent.Agreement_Type__c != null)
                            act.Description += '\nAgreement Type = '+ ent.Agreement_Type__c;
The result i need in blue color.
Nitish Bansal 2Nitish Bansal 2
Hi Naveen

You cannot change the font color using the standard page layout. However, you could use a custom in-line visualforce page for the particular field and embedd it in the standard layout to resolve your problem.

In Apex code, fields with data type as Rich Text Area can hold color values using styling in the class itself, like '<b><u>EXAMPLE TEXT IN FIELD</ul></b><font color=red>(please see below)</font>'  but it also works only with VF/in-line VF page when the field is used as an outputText with the attribute 'escape' set as 'false'.

Thanks Nitish Sent from my Windows Phone