Useful CRM Tips

Useful CRM Tips...

Thursday, October 06, 2011

Alert User on Abnormal Close of CRM form Window


The Below Code will Popup the alert when you close the form without saving the changes made in that.

/* Code to Alert User On Abrupt Close of a Window */

window.onbeforeunload =
function () {
    if (document.getElementById("IFRAME_QueryXML").contentWindow.window.ispagedirty) {
        event.returnValue = "Changes made to Conditions will be lost!";
        return false;
    }
};

No comments:

Post a Comment