Posts

Showing posts from December, 2023

Connecting HTML Web Resource and Forms in Dynamics 365 Model-Driven Apps with JavaScript (Implementing Dynamic Percentage Circles)

Image
  In the realm of Dynamics 365, customization often extends beyond the built-in features. Recently, I encountered a challenge: how to visually represent dynamic percentages for various skills on a Dynamics 365 form. This blog post delves into the HTML and JavaScript work that led to the creation of dynamic percentage circles, providing an engaging and informative solution. 1) Create Web Resources in PowerApps a. Form_onload.js Create a new JavaScript web resource named "Form_onload.js" in PowerApps. This script will handle the form onload event and set the client API context. function form_onload(executionContext) {     debugger ;     var formContext = executionContext.getFormContext();     var wrControl = formContext.getControl( "WebResource_name" ); // Replace "WebResource_name" with the actual name of your HTML web resource     if (wrControl) {         wrControl.getContentWindow().then(        ...