In earlier version of dynamics CRM, there were no way to define dependencies of web resource. Due to this, it is possible that someone delete/remove WebResource from solution and this may create an instability in behavior of CRM functionality.
But now in dynamics 365 version 9.0. It has ability to define dependencies of WebResource.
Let’s consider below example. I have 3 web resources-
- Here new_test3.js is dependent on new_test.js and new_test2.js. in that case we need to define dependencies.
- Once dependencies are defined it will not allow to delete WebResource.
If you want to add dependencies in WebResource, you can follow below steps
- Open WebResource which is dependent on other WebResource
- Select dependencies tab as shown and click on add
- Select WebResources that are required to present
- Save and publish WebResource.
- If anyone accidentally tries to delete WebResource. He will receive alert message.
- It will list down where this file is needed
By following these steps, you can create WebResource and define dependency of WebResources.