You need to sign in to do that
Don't have an account?
davidesi
Add error message into the opener window
Hi to all.
I need to add an error message to a opener window. I explain it:
In opportunity page I have a buton wich open one window. That window has a search functionality.
I need that if code throws an exception, it be shown in the opportunity window, not in the search one.
Could you help me in how doing it?
Thanks in advance
I got the solution!
I needed to add an Id in <Apex:pageMessages id='error' /> , and specify to rerender that div in the button with the code rerender="error".
All Answers
You can create a visualforce page and add error message on that.
Next when you get exception on search window, use javascript and set window.parent.location=apex/errorpage?showErrorNumber=777
I am having troubles with that apparantly simple thing.
I have done following steps:
1º In the try-catch clause , I have added the following code:
ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.INFO,Label.PlsEnterData);
ApexPages.addMessage(myMsg);
2º In the VF page , I have added the VF tag
<Apex:pageMessages />
And it’s not working.
Do you know why?
I got the solution!
I needed to add an Id in <Apex:pageMessages id='error' /> , and specify to rerender that div in the button with the code rerender="error".