Above message is the standard Internet explorer message which is thrown to tell you that form was not saved, but you are trying to move away. In most of the cases, when user has just one checkbox to allow some action for an existing record, user has to do that, save it and again proceed... This seems wastage of time. In such cases, we have to make it simple by saving form when user clicks to checkbox.
if (crmForm.all.new_readyForProcess.checked) { if (crmForm.FormType == CRM_FORM_TYPE_UPDATE) { crmForm.Save(); } }
Other case is refreshing the form after some action such as status change. Though, browser throws this message with a big reason, it’s not applicable in these kinds of cases.
Instead of refreshing, loading the page again would help you getting rid of this message.
//window.location.reload(true); sURL = unescape(window.location.pathname); window.location.href = sURL + '?id=' + crmForm.ObjectId;
Quite simple..
No comments:
Post a Comment