The below post is all about closing child window and refreshing parent window after updating record. http://salesforceworld4u.blogspot.in/2015/06/closing-child-window-and-refreshing.html But let's think there is a requirement like we have to validate before updating and closing child window then above approach wont work. For the above requirement we have to pass javascript code in pagereference method instead of calling javascript on button click. public PageRefeRence savingAccount(){ PageRefeRence pageRef ; if(account.name == ''){ ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.Error,'You must enter some value...'); ApexPages.addMessage(myMsg); } else{ upsert account; } ...
A place where you have to land for exploring Salesforce