Use mock-xrm to Upgrade the Removed ClientGlobalContext.js.aspx in Dynamics 365

UPDATE: Since posting this article, Microsoft has updated their documentation to be “The ClientGlobalContext.js.aspx page is deprecated and scheduled to be unavailable after October 1, 2021. Alternative methods to access global context information will be available before April 1, 2021”: ORIGINAL POST: According to the Microsoft website, the ClientGlobalContext.js.aspx library will be removed on December 1, 2020: A lot of organizations use ClientGlobalContext.js.aspx in HTML web resources, and this means … Continue reading Use mock-xrm to Upgrade the Removed ClientGlobalContext.js.aspx in Dynamics 365

Fixing HTML Web Resources Breaking Bug in Dynamics 365

In this post, we will look at an issue in Dynamics 365 and HTML web resources. This is a known issue according to the community forums that Microsoft has said to be working to resolve, and may already be resolved in your org. If you’re having this issue, it’s likely your org does not have the fix and you can try below. The issue is, when an HTML web resource … Continue reading Fixing HTML Web Resources Breaking Bug in Dynamics 365

Use ESLint to Validate Your JavaScript in Visual Studio Code

ESLint is a linter that runs in Visual Studio Code to analyze code for possible errors. In this post, we will look at how to set up ESLint in Visual Studio Code, in order to check JavaScript files for errors. You will need node and npm installed. First, let’s create a new directory and open the directory in VS Code: Now, let’s create a JavaScript file. We will call our … Continue reading Use ESLint to Validate Your JavaScript in Visual Studio Code

How to Beautify a JavaScript File in Visual Studio Code

In this post, we will look at how to beautify a JavaScript file in Visual Studio Code using the  Beautify extension. First, let’s create a really simple JavaScript file. We can see the function is on one line: Search for and select Beautify: Click Install: Now, select CTRL + SHIFT + P or the View menu to bring up the Command Palette: Search for Beautify and you will see: Beautify … Continue reading How to Beautify a JavaScript File in Visual Studio Code

How to Get the Direct URL of a Web Resource in Dynamics 365 Power Apps

Let’s look at how to get the direct URL of a web resource in Dynamics 365 Power Apps. This can be useful if you have a stand-alone HTML web resource, for example. First, let’s create a web resource in the Power Apps Maker: We will create an HTML web resource. On saving the Web Resource, we see the URL is provided: And clicking on the link will open the URL: … Continue reading How to Get the Direct URL of a Web Resource in Dynamics 365 Power Apps

Getting Plural Names of Entities using WebApi

In Dynamics 365 / Power Apps, entity names can have various different plural extensions, such as “s”, “es”, “ies” etc. So when you’re writing code and you need the plural name of an entity dynamically, knowing only the singular name, how do you get it to ensuring you’re using the right name? You can use Xrm.Utility.getEntityMetadata to get it. For example, with accounts below: This produces: A more interesting example, … Continue reading Getting Plural Names of Entities using WebApi

Form Designing and Screen Resolution in Model-Driven Power Apps

When building model-driven Power Apps, one useful feature in the Power Apps form designer is the ability to view the form being designed in various different resolutions. To use this, open a form in design mode. Below we are viewing the Account Main form. You can see at the bottom of the designer, we are displaying Desktop (1920 x 1080): Clicking on this, we see there are other options: Desktop … Continue reading Form Designing and Screen Resolution in Model-Driven Power Apps

How Patching of Solutions Works in the Power Platform

In the Microsoft Power Platform, there is a concept of patching solutions. Patches are useful when you want to deploy code from one environment to another. With patches, you would have already released a solution from one environment to another, and then be in a situation where you need to deploy a fix or enhancement to that solution. Instead of updating the original solution and deploying that full solution again, … Continue reading How Patching of Solutions Works in the Power Platform

How to Save Your Dynamics 365 Code from Cloud to to Disk

In this post, we will go over how to save the code in your Dynamics 365 instance back down to disk on your machine. You may want to do this if you want to take a backup of your customizations, though in a better scenario you would have the latest code in source control. To do this, we can use the Webresources Manager plugin for the XrmToolBox, developed by MscrmTools. … Continue reading How to Save Your Dynamics 365 Code from Cloud to to Disk

Custom Actions in JavaScript with Output Parameters in D365 and PowerApps

In this post, we will look at how to retrieve output parameters from custom actions in the Dynamics 365 and Power Apps from JavaScript. Firstly, I blogged previously about how to run custom actions in Dynamics 365 / Power Apps using Xrm.WebApi.online.execute. It appears in some conditions, this functionality does not return output parameters from an action. Issues I have found specifically include using this with Unified Interface / UCI … Continue reading Custom Actions in JavaScript with Output Parameters in D365 and PowerApps