Child form onSave script giving error RRS feed

  • Question

  • Dear All,

    I am working on opportunity product onSave event script. On Onsave event i am checking one of the field value from Opportunity. But the problem is when i close the opportunity window, and trying to save the opportunity product it gives the following error.

    The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute.

    The following line on the OnSave event:

    var AllowedDisc = window.opener.parent.document.getElementById('new_discountpercentage').DataValue;

    How to check if the parent window is closed/still opened.



    • Edited by crmpnk1 Thursday, January 5, 2012 11:33 AM
    Thursday, January 5, 2012 11:33 AM


  • never tried this... but how about...

    if ( window.opener!=null && window.opener.parent != null)

    Another way is to write a json or soap.script to retrieve the value from the parent i.e opportunity



    Dynamics CRM MVP | Inogic | http://inogic.blogspot.com| news at inogic dot com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Thursday, January 5, 2012 3:46 PM