Web resource dependencies in Model driven apps Power Apps
Web resources are important components in Power Apps to store JavaScript’s, Images inside Dataverse. You can write JavaScript in web resource so that you can call functions declared for some events like On Save, On Load etc.
The column must be represented by a control on the form to be used in a web resource. If by any chance someone removes the field from the form then your JavaScript code will break written in the web resource because the referenced column is no longer available. To ensure that the columns data is always available for your script, you can add the column as a dependency.
To configure web resource dependency open the web resource in form editor library section and edit to open the web resource in classic mode.
The following image shows adding the Roll Number column from the custom table student as a dependency.
The first section represents other web resource dependency with the current web resource.
The second section represents columns dependency for web resource.
Now we are safe as it will not break our code if by mistake someone try to remove the field from form.
Follow my blog for more trending topics on Dynamics 365, Azure, C#, Power Portals and Power Platform. For training, Courses and consulting, call to us at +91 832 886 5778 I am working more for community to share skills in Dynamics 365 and Power Platform. Please support me by subscribing my YouTube Channel. My YouTube Channel link is this : https://www.youtube.com/user/sppmaestro