0

i have a javascript button (OverRidden the standard create contact button)to create a contact record from account detailpage, which opens a vf page in model window and after clicking on save the window should close down and the record should be inserted in the contact related list.

It works fine if i scroll down to the related list and create from there but when i create record from contact hover related list link, the model window appears but after clicking save button it is not redirected back to the standard account detail page

code:

<apex:commandButton action="{!dosave}" value="Save" status="id1" rerender="buttons"/> 

<apex:actionStatus startText="(Saving...)" onStop="if (!{!error}) {window.opener.location.href='/{!accountID}'; self.close();} else self.edit();" id="id1"/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.