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
j_panchalj_panchal 

PageReference opens new window instead of redirecting in internet explorer.

Hi,

 

i have a custom section with a custom button on Account tab, from the section a VF page is opened as modal dialog after the custom button is clicked. On the modal dialog some records are updated and then i want to redirect to another VF page in the dialog window itself (i.e. the redirect should happen in the modal dialog itself) 

 

the code of the VF page which is opened as modal dialog is as below - 

 

public PageReference updateRecords()
{
    // update some records

   

   //code to redirect to another VF page after the update is done 

  PageReference newPage = new PageReference('/apex/UpdateResult?Message=Record Updated Successfully'); 
  newPage.setRedirect(true);
  return newPage;

  

}

 

when i execute the above code in Firefox it works fine and redirects to newPage inside the modal dialog, but in IE it opens a new window instead of redirecting when i click the button on modal dialog.

 

i've used "window.showModalDialog('/apex/VFPage') ;"  to open modal dialog and show the VF page, and the version of internet explorer is 9.

 

Please provide any suggesstion on how to do this.

 

Thanks in Advance.