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
Vijay NagarathinamVijay Nagarathinam 

add new line in page message

Hi,

I want to add new line in the apex page message. Below I have used the code, but its not working for me.

       
ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO,'Notice: <br/> Test Error Message'));
        return true;
I need to show the error message like this.How to achieve this. 

Notice:
Test Error Message.


Thanks,
Vijay
 
Mani RenusMani Renus

Hey Vijay,

In your VF add escape attribute in your pagemessage component and make it as false like as below

<apex:pageMessages escape="false"/> 

Hope it helps you!

Vijay NagarathinamVijay Nagarathinam
Thanks Mani.!
Mani RenusMani Renus
Please make it as a best answer if it solves your problem.