Often times we created scripts with alerts to the user, or getting some sort of simplistic interaction with the user. Some of those do change in Dynamics CRM 2013.

If we used window.alert or window.confirm now it’s time to stop that. The new SDK has a warning for us to use the newly provided functions.


instead of using window.alert now the recommended way is to use

Xrm.Utility.alertDialog(message, onCloseCallback);


instead of using the old window.confirm now we should use

Xrm.Utility.confirmDialog(message, yesCloseCalback, noCloseCallback);

Observe the use of the callback function to continue processing your business flow.

Unfortunately these are only available for the entities where the UI has been updated, but they will definitely come in handy.

The change was prompted by the support for all browsers, and the use of tablets and other devices. On tablets, calls to functions that block the flow of code is not allowed.