Alternate for crmForm.detachCloseAlert() in CRM 2011 Xrm attribute RRS feed

  • Question

  • Hi All,

    As you all know we have crm 4.0 method detachCloseAlert() of "crmForm" which basically uses to simply close the form without any popup such as "do you want to save the unsaved changes?" etc. 

    Now that after installing Update Rollup 14 of CRM 2011, this method is not working(guess this method is suppressed) and we have to use some workaround for this.

    Below are the things i tried using Xrm attribute of CRM 2011

    First thing i did is to set the submitMode of all the dirty attributes to "never" as shown below and then perform Xrm.Page.ui.Close().

    Xrm.Page.data.entity.attributes.forEach(function (attributes) {
                                if (attributes.getIsDirty() == true) {

    BUT, there is a popup coming which says do you want to leave this page or stay on this.

    Can anybody help me in getting rid of this popup.

    Just an info: i have also used window.onbeforeunload() to null but did not get any result.

    Let me know if you need any more information from my side.



    Tuesday, November 12, 2013 8:53 AM