Issue with IE9 -> OnBeforeUnlose -> SetSubmitMode -> Never RRS feed

  • Question

  • Hi Techies,

    Running with a weired problem here.. one of our project requirements is to close the form with out asking for confirmation (Form is dirty confirmation message that CRM shows) when user directly uses IE Close button. We achived it by attaching beforeformclose event during load of form as shown below..
    function DiscardAllChanges() {
    window.onbeforeunload = function () {
    var ownerId = Xrm.Page.ui.controls.get("ownerid");
    if (ownerId != null) {
    var attributes = Xrm.Page.data.entity.attributes.get();
    for (var i in attributes) {
    Till now in IE8 its working fine. But the same code is failing in IE9... Did lot of googling, but couldnt able to figure out a proper solution..
    One another surprising thing is in IE9 also, the dev organization is working fine but not the Test Organization (both are in different servers but with same RU13)..
    Thoughts ???

    Imposible it self is having Posible.. Dont leave it until you get it..

    Thursday, October 3, 2013 12:37 PM