function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PhantomPhantom 

Unable to redirect to another page ?????

I have VF page export to CSV or excel file (set content type), i expect after exporting CSV file or excel file, this will redirect to another VF page. But it do not work. So, anyone help me this, pls!

 

It my redirect code:

 

return new Pagereference('/apex/newPage');

 

 

 

SPDSPD

try this.....

 

PageReference pr = new PageReference('/apex/newPage');

pr.setRedirect(true);

 

return pr;

PhantomPhantom
it still not work, in this page i set the contentType: contentType="text/csv#untitle.csv" to export csv file. After exporting file, the page cannot redirect to NewPage. Althrough i try to use PageRedirect('...').