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:
Great article, couldn’t have said it better myself 🙂
I’d also like to add that even if there are issues in future versions of CRM (probably most likely due to CRM’s CSS interfering with Alert.js), this project will continually be receiving updates and improvements as new versions of CRM are released. It’s also all open source so if something does break and it doesn’t get fixed right away, someone in the community may take on the challenge to fix it, and then we can merge their changes with Master.
Awesome analysis. Thanks.
Thank you Alex for review. And many thanks to Paul for sharing this handful and easy to use addon. Meanwhile, want to notice that GitHub link is broken at the moment. The only place I was able to found it was CodePlex.