You need to sign in to do that
Don't have an account?
Hanimi Reddy
How to redirect to parent page after generation of pdf/excel?
Hello All,
I have two scenarios.
1) I am generating the excel from vf page,which have button. Right now on button click its redirecting to page and downloading the excel.
After that its not redirecting to the orginal page?
2) Also i m generating the pdf from standard detail page on clicking of custom button.
same thing here also after genrating the pdf its not redirecting to the orginal page.
Please help on these things.....
I have two scenarios.
1) I am generating the excel from vf page,which have button. Right now on button click its redirecting to page and downloading the excel.
After that its not redirecting to the orginal page?
2) Also i m generating the pdf from standard detail page on clicking of custom button.
same thing here also after genrating the pdf its not redirecting to the orginal page.
Please help on these things.....
For 1st case, You can use "setRedirect(false)" if you are using apex method with pagereference as return type.It will keep you on the parent page.
For the 2nd case, either open it in a new tab or you can use "iframe" tag.Create a button on main page & write a method to redirect to parent page and inside iframe use the page which is to be rendered as pdf.