Retrieve Environment Variable Values using JavaScript

This guide shows how to use JavaScript to query Dataverse environment variables and reference the values within a Model Driven App. This guide assumes you already know how to add JavaScript as a web resource and attach it to a Model-Driven App form. If not, I would review Microsoft's guides here: Create or edit model-driven app web resources to extend an app View and edit web resource properties for model-driven app forms Display Text Environment Value in a Notification Banner In the first example, we’ll use the formContext.ui.setFormNotification API to display an email address directly on the form.…

Comments Off on Retrieve Environment Variable Values using JavaScript

Hide a Business Process Flow Using JavaScript

In some scenarios, you may want to hide a Business Process Flow (BPF) once the entire process is complete. In this post, we’ll walk through how to achieve this in a model-driven app using JavaScript. Once the last stage is completed, the JS code hides the control. The Methodology We can use the formContext.data.process client API to determine the status of the BPF with the getStatus method. When the process is complete, this method returns the string value "finished". Then, call the formContext.ui.process.setVisible method to hide or show it. Applying the Code Create a new web resource and…

Comments Off on Hide a Business Process Flow Using JavaScript

Write to Dataverse Notes Table using Web API

I had a challenge recently where I needed to migrate hundreds of notes from an old database to the Dataverse. Dataverse has an Out of the Box Notes table (logical name “annotations”) that allows for recording notes and attachments against a related table. This post will showcase the preparation steps and PowerShell script used to do just that. Preparation Steps Enable Notes and Attachments For this example, let’s assume we are trying to write rows from a csv into the notes table regarding Purchase Orders. First, ensure the table has the option “Enable Attachments (including notes and files)”…

Comments Off on Write to Dataverse Notes Table using Web API

Intro to Deep Linking in PowerApps

Instead of opening an app's main screen, there are scenarios where you'd want to directly take a user to a specific screen. This post will explore how to deep link to a specific record in both Canvas and Model Driven Apps. Example Use Case Consider an example where app contains Purchase Orders. When someone creates a new purchase order (PO), Power Automate sends an email to the manager with a deep link to the corresponding PO. The deep link directly to the main form for that PO. A Deep link in an email navigating to the Main Form…

Comments Off on Intro to Deep Linking in PowerApps