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
chris38chris38 

Refresh salesforce page

Hi,
I meet a new problem.

A custom object has been created in salesforce to call a survey.

In salesforce, a click on the survey link opens a new window where the survey appears. When the survey is finished, i wish to close the survey window and refresh the parent salesforce page.

I know to close the survey window (javascript) but i don't know how to refresh the parent page.

if i create a html page from an other, i know how to close child page and refresh the parent.
But it seems that it's different with salesforce.

Any ideas ?

Thanks,
chris
sean_at_33050sean_at_33050

I have an scontrol that opens creates a new window showing status of creating a new object, and when done reloads the parent window with the new object, and then closes itself.

Relevant code below:

Code:

// use this to refresh the parent page
window.opener.location.reload(); 
// -- OR ---
// use this to reload the parent with a different object
window.opener.location.replace(new_url); 
// then this
window.close(); 


 
If reloading a newly created object new_url would be something like: "/" + saveResult[0].id 

Or you could use any url.