We have a system with a very large number of custom entities, plugins and processes. It is often the case that we want to do something fancy on the form, such as modify the available values in drop down lists based on some other selections on the form. To achieve this, we have used javascripts.
In the early days, in Dynamics CRM 2011, this worked without any hassle. Then we upgraded to Dynamics CRM 2016 (8.1) and, due to a new feature, the form didn't reload anymore after saving. So we created a hack to forcibly reload the form: We added ModifiedOn field to the form and into its OnChange event we added the following javascript code:
SaveAndReloadExtension = {
saveAndReload : function() {
setTimeout(function(){
var id = Xrm.Page.data.entity.getId();
var name = Xrm.Page.data.entity.getEntityName();
Xrm.Utility.openEntityForm(name, id);
}, 100);
}
};
This works fine in Dynamics CRM 2016 (8.1.1.1005). It also works fine in Dynamics 365 (8.2.2.112) with the exception that it does not work at all with Internet Explorer. In Firefox and Chrome it works like before, but in IE the form gets stuck when reloading. The save action works and the entity gets updated, but when the form tries to reload itself, it only shows the following animated loading-icon in the middle of a blank screen and is stuck there forever:
All versions mentioned here are on-premises.
Any ideas on what causes this behavior and how it could be fixed?
*This post is locked for comments