You need to sign in to do that
Don't have an account?
Ty Whitfield
Apexpages.messages not displaying in classic
This is strange. I have apex:messages that work correctly in Lightning, however, in Classic they do not show. After some researching, I tried putting the messages in an outputText. But then it doesn't render with the set styling. So for example, it renders the text in white but if I set it to black, red or any other color, it just ignores it and still puts it in white. Any ideas? Below are code snippets.
<div > <apex:Messages style="color:white;font-size:1.3em;font-weight:bold"/> <apex:outputText rendered="errorStatus" style="color:#ff0606;" value="{!errorMsg}" id="msg"/> </div>
if(Opp.StageName != 'Closed Won') { stageStatus = Opp.StageName; pageStatus = false; errorStatus = true; ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR,'The opportunity has not been won yet. You must mark the opportunity as Closed Won before finalizing it!')); errorMsg = 'The opportunity has not been won yet. You must mark the opportunity as Closed Won before finalizing it!'; }
Try below code
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
Best Regards
Sandhya