Skip to content

Disable Page Close Confirmation in CRM 4.0

If you have worked with CRM, then you must have observed an annoying popup message whenever you try to close a form once you have made any changes to it. In certain cases, you might like to avoid showing that dialogue. In one of the recent engagements, I had to change some values on the form when it loads but then users started complaining that even if they don’t change anything they are presented with the dialogue box asking to save the record. And then what I had to put a crmForm.Save(); statement after I’ve changed the values[That’s lame I know…]. However, I stumbled upon on this unsupported and undocumented function that helps you get rid of that irritating popup. Use it wisely and you will be good to go :

crmForm.detachCloseAlert()

Leave a Reply

Your email address will not be published. Required fields are marked *