locked
Refresh Parent crm from from aspx page RRS feed

  • Question

  • Hi,

    I have a crm form. on this form i have custom button. when i click on the custom button a small pop up will open which we designed using aspx. when i close this aspx i want to reload my parent crm form. how can i do this.

    Wednesday, April 4, 2012 3:14 PM

Answers

  • Hi,

    You can use window.opener on your popup page to get access to the window which contains a button for opening popup. So, declare some function for refreshing your form, and once popup window is closed call it as window.opener.refreshForm.

    Thanks,

    Alexey

    Wednesday, April 4, 2012 9:20 PM

All replies

  • I don't know that you can do that from a popup because it's a different window.  You could do it from a page in an iframe by calling a web resource in the parent.

    Jamie Miley
    Check out my about.me profile!
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!

    Wednesday, April 4, 2012 4:53 PM
    Moderator
  • Hi,

    You can use window.opener on your popup page to get access to the window which contains a button for opening popup. So, declare some function for refreshing your form, and once popup window is closed call it as window.opener.refreshForm.

    Thanks,

    Alexey

    Wednesday, April 4, 2012 9:20 PM
  • @KishanRaj..

    Were you able to resolve the issue? If Yes, can you share your solution plz. Thanks!

    Tuesday, July 3, 2012 3:41 PM
  • One consideration is whether the aspx page is within the CRM site. If it is (though this is not supported for code that uses the CRM 2011 endpoint), then you can access each page from the other, e.g. by using window.opener as suggested above.

    However, a simple solution, which works whatever site the aspx page is in, is to open the aspx page as a modal dialog, using window.showModalDialog. The calling code will then be blocked until the dialog is closed, then you can refresh the crm form:

    window.showModalDialog('mypage.aspx');
    window.location.reload(true);


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Tuesday, July 3, 2012 7:04 PM
    Moderator