Did you ever want to display a “loading” indicator in Dynamics? Like this one below?
That’s just one of the functions in the alert.js, though. There are others, but it’s all about displaying popup notifications in a user-friendly way.
You can download Alert.js solution for Dynamics from github:
And you can find complete documentation here:
However, every now and then a question comes up in the Dynamics Community Forum where somebody would ask if alert.js is supported or not.
Paul Nieuwelaar (the author of Alert.js) wrote this:
“While technically unsupported, this code is 100% contained within the solution, and doesn’t depend on anything CRM related, so it’s unlikely this will break with CRM updates.”
It’s right there, on the alert.js github page.
But that’s what I wanted to elaborate on a bit more in this blog post.
The problem with these methods is that you never know if they are going to work in the future versions of Dynamics since Microsoft gives no guarantee that there will be no changes in the underlying DOM model. All those html element id-s can change or even disappear, so, in that sense, this kind of scripts are not guaranteed to work after the upgrade.
This is where an additional HTML element(containing some other elements) is added to the body of the document. The rest of alert.js will be using that dynamically created HTML to display the popups, to set the titles of those popups, etc.
The important part is: since alert.js is creating that HTML, it knows the structure of that html. Which means that, technically, alert.js script is not supposed to break anything even after Dynamics is updated.
Does it make it a supported customization? I would probably say so.. although, there is one scenario where it might break something.
In that sense, it’s probably correct to say that alert.js is, technically, unsupported. But, it seems, the likelihood of alert.js breaking something in Dynamics is very low, and those additional usability features it can bring to Dynamics may well be worth taking a bit of a risk: