Posts

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(        ...

Creating a Custom Pop-Up Page in Model-Driven Apps Using JavaScript and Ribbon Workbench

Image
  Here are the steps to create a custom page for implementing a pop-up screen using a canvas app: 1) Components Used in the Canvas App: These components were utilized in the canvas app for implementing the pop-up screen. 2) Onstart of App:      Set(rejectdialogue, false);   // To control the visibility of the "Are you sure?" alert after the Reject button click.      Set(quitdialogue, false); // To manage the visibility of the "Are you sure?" alert after the Quit button click.      Set(rejectstatus,false); // To control the visibility of the "Submission Rejected" message.      Set(rejected,true); // To control the visibility of the Container Menu.      Set(blanktext,false); // To control the visibility for the alert message "*Justification Comment cannot be blank".      Set(RecordItem,If(IsBlank(Param("recordId")),Blank(),GUID(Param("recordId")))); // Pass the parameter as the record...