+ Start a Discussion
kkr.devkkr.dev 

Error Message on Visual force page

Hi All,

 

ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR, 'Please go this link'+www.google.com);

 

I want to have a link to google.com on error message. Any Idea?

 

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
kkr.devkkr.dev

I got it.

 

ApexPages.Message extfile = new ApexPages.Message(ApexPages.Severity.ERROR, 'Please click link  <a href="www.google.com">Google</a>');

 

<apex:pageMessages escape="false">

All Answers

Andy BoettcherAndy Boettcher

That link to Google is text - you need to enclose it in the string quotes along with "Please go this link".

 

-Andy

kkr.devkkr.dev

I got it.

 

ApexPages.Message extfile = new ApexPages.Message(ApexPages.Severity.ERROR, 'Please click link  <a href="www.google.com">Google</a>');

 

<apex:pageMessages escape="false">

This was selected as the best answer