Activity › Forums › Salesforce® Discussions › Action when Salesforce visualforce page closes Tagged: Salesforce Apps, Salesforce Error, Salesforce Visualforce Page Salesforce® Discussions Action when Salesforce visualforce page closes Posted by Suman Sarita Mahapatra on October 28, 2017 at 5:09 PM window.onbeforeunload / window.close is not working for me Gouse Pasha Shaik replied 8 years, 7 months ago 2 Members · 1 Reply Salesforce AppsSalesforce ErrorSalesforce Visualforce Page 1 Reply Gouse Pasha Shaik Member November 2, 2017 at 4:46 AM window.close() method is only allowed to be called for windows that were opened by a script using the window.open () method. Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me