I have a form that is being called with the Popup method. It adds a record to the database (which was listed on the previous / underlying page).
Once the form is completed, how do I:
1. Close the form window
2. Reload the underlying page so that the item just added via the popup shows up?
In the "Submission Confirmation" box under "Form Properties" I tried adding:
<script>
function CloseAndRefresh(){
window.opener.location.href="/{!$CurrentPage.parameters.yourAccountIdParamName}";
window.top.close();
}
</script>
but it did nothing. This code came from a JS forum elsewhere.
I know there is the option to "Redirect to a Page" but, of course, since this is a popup window that won't work.