locked
How to avoid dialog displayed when Xrm.Page.ui.close() is called? RRS feed

  • Question

  • Hi,

    How to avoid dialog displayed when Xrm.Page.ui.close() is called? When Xrm.Page.ui.close() is called a prompt is displayed to whether save or cancel the changes. I want to forcefully close the form without saving the changes. How can do this?

    I have tried with the below satement after close statement, but no luck, any help greatly appriciated!!

    Xrm.Page.ui.detachCloseAlert()


    Thursday, October 4, 2012 6:04 PM

Answers

  • Hi,

    maybe you can do this by setting all fields on the form to setSubmitMode("never").

    Greetings,

    Pavlos


    Please mark this reply as answer if it helps you find a resolution to your problem.

    Thursday, October 4, 2012 7:13 PM
  • Hi,

    Here are two articles which will help you perhaps:

    http://madcomputerist.blogspot.co.at/2012/03/forcesubmit-vs-setsubmitmode-in-crm.html

    http://mahenderpal.wordpress.com/2011/07/01/close-ms-crm-2011-form-using-js/

    Best regards,

    Andreas


    Andreas Buchinger
    Microsoft Dynamics Certified Technology Specialist
    MCPD: SharePoint Developer 2010

    Friday, October 5, 2012 6:50 AM

All replies

  • Hi,

    maybe you can do this by setting all fields on the form to setSubmitMode("never").

    Greetings,

    Pavlos


    Please mark this reply as answer if it helps you find a resolution to your problem.

    Thursday, October 4, 2012 7:13 PM
  • Hi,

    Here are two articles which will help you perhaps:

    http://madcomputerist.blogspot.co.at/2012/03/forcesubmit-vs-setsubmitmode-in-crm.html

    http://mahenderpal.wordpress.com/2011/07/01/close-ms-crm-2011-form-using-js/

    Best regards,

    Andreas


    Andreas Buchinger
    Microsoft Dynamics Certified Technology Specialist
    MCPD: SharePoint Developer 2010

    Friday, October 5, 2012 6:50 AM