Get and Set Field Values using FormContext and JavaScript with Dynamics 365 and PowerApps

In this post, we will look at how to get and set field values using FormContext and JavaScript. Let’s say we want to get and set the Website field of the Account form: Let’s do this on Save of the form. Edit the form and go to Form Properties: Create a new JScript web resource: Add the following code: function GetSet(executionContext) { var formContext = executionContext.getFormContext(); // Get value var … Continue reading Get and Set Field Values using FormContext and JavaScript with Dynamics 365 and PowerApps

Calling JavaScript Functions in Unified Service Desk running Unified Interface Pages

In this post, we will look at how to call JavaScript functions from Unified Service Desk running the Dynamics 365 Unified Client Interface. Let’s go through this. In my setup, the page I will run the JavaScript from is the Account page, which is set up in USD as a type Unified Interface Page running Chrome Process hosting type: First, let’s create a web resource. I have a solution called … Continue reading Calling JavaScript Functions in Unified Service Desk running Unified Interface Pages

Running FetchXML using Xrm.WebApi in Dynamics 365

In this post, we will look at how to run FetchXML using the Xrm.WebApi with JavaScript in Dynamics 365. First, let’s create some FetchXML. We will use the FetchXML Builder in XrmToolbox to create FetchXML with single quotes. You can use your preferred tool to create FetchXML: Now the code. We will place our FetchXML inside back ticks to create a multi-line string in JavaScript. We will then encode the … Continue reading Running FetchXML using Xrm.WebApi in Dynamics 365

Using the Power BI Horizontal Bar Chart Visualization

The Horizontal Bar Chart is a Power BI visualization from Microsoft. To install it, in Power BI Desktop, select Import from Marketplace: Click Add: Click OK: You will see the new visualization added: Let’s add some fields. We have a Revenue field and Total Amount Spent field. Let’s look at these by City: We can see the visualization is useful in comparing values:  

Using Xrm.Navigation.openForm to Open Quick Create in Dynamics 365

We can use Xrm.Navigation.openForm to open a Quick Create using JavaScript. Let’s say we want to open the Account quick create form on a Contact record in the Unified Client Interface / Unified Interface. Let’s go to a contact record: To simply open the quick create without setting any field values, we can use the code: Hitting F12 to run this code in developer tools, we see the quick create is … Continue reading Using Xrm.Navigation.openForm to Open Quick Create in Dynamics 365

Using the GENERATESERIES DAX Function in Power BI

GENERATESERIES is a useful DAX function when you need to create a table with a series of values. Let’s go through how to use it. In Power BI Desktop, go to the Modeling tab and select New Table: Enter GENERATESERIES, and we can see the parameters it takes is: StartValue. This is the first row value of our new table. EndValue. This is the last row value of our new … Continue reading Using the GENERATESERIES DAX Function in Power BI

How to Install the Power Apps CLI

The Power Apps CLI is the command-line interface that is used to build Power Apps Component Framework controls. To install it, go to the link https://aka.ms/PowerAppsCLI which will download the PCF file. Click to open the powerapps-cli-1.0.msi file: Click Install: And finish: If we go into Windows Add/Remove Programs, we can see the Microsoft PowerApps CLI has been installed: If we go to a Command Prompt and type pac, we see the CLI … Continue reading How to Install the Power Apps CLI

Installing the React DevTools Extension

The React DevTools are useful browser extensions for when developing React. To install the React DevTools extension, for Chrome go to https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en and click on Add to Chrome: Click Add Extension: For Firefox, go to https://addons.mozilla.org/en-US/firefox/addon/react-devtools/ and click Add to Firefox: And Add: For Edge, go to https://microsoftedge.microsoft.com/addons/detail/react-developer-tools/gpphkfbcpidddadnkolkpfckpihlkkil: And click Add extension:  

Classify Your Data with Power BI Dashboard Data Classification

Power BI has a feature that helps users understand the sensitivity of the data they are dealing with. This is referred to as Data Classification and can be useful when implementing data governance. Let’s go through how to set this up. First, Data Classification will need to be enabled by a Power BI Administrator under Tenant Settings. To do this, go to Settings and Admin portal, then select Tenant Settings, … Continue reading Classify Your Data with Power BI Dashboard Data Classification