I have a a VF page that that exports a set of data to excel, the export button correctly redirects to the export page and the file is downloaded.
public PageReference exportData() {
system.debug(Ids);
PageReference pr = page.ExportImpactAnalogues;
pr.setredirect(true);
pr.getParameters().put('exportIds',Ids);
return pr;
}
However, once downloaded i want to return to the original screen and its refusing to do so using either:
public PageReference returnToPrevPage() {
system.debug('REDIRECTING');
PageReference redirect = new PageReference('/apex/ImpactAnalogueSelector');
return redirect;
}
or
public PageReference returnToPrevPage() {
system.debug('REDIRECTING');
PageReference redirect = Page.ImpactAnalogueSelector;
return redirect;
}
any ideas what im missing??
Cheers Paul
