Calling the RetrieveEntity WebAPI Function with Enum Types

In Dynamics 365, there are several functions that we can call from the Web API. You can see a list of these functions here. When calling these functions, we can use Xrm.WebApi.execute and specify an action as the operationType: In some cases, this doesn’t appear to work as expected, and you may need to revert to sending through the request using XMLHttpRequest. Let’s look at the example of using the … Continue reading Calling the RetrieveEntity WebAPI Function with Enum Types

Import Excel Data into a Model Driven PowerApp using Data Integration Project

In this post, we will import data from an Excel spreadsheet into a model-driven PowerApp, creating a Data Integration Project that uses Power Query. First, let’s look at a spreadsheet we have. It contains 2 accounts, with the account name and revenue: This spreadsheet is sitting in a SharePoint library. Let’s go to PowerApps.com and pull up our model-driven app. Select Entities: Clicking on Accounts, we can see the data … Continue reading Import Excel Data into a Model Driven PowerApp using Data Integration Project

How to Display an Alert in Power Apps using JavaScript

When using JavaScript, we can display alerts in model-driven Power Apps. To do this, we can use openAlertDialog. The syntax for this method looks like below: Xrm.Navigation.openAlertDialog(alertStrings,alertOptions).then(closeCallback,errorCallback); As a simple example, we can use: var alertStrings = { confirmButtonLabel: “Got it”, text: “Something happened.”, title: “Alert Title” }; var alertOptions = { height: 500, width: 500 }; Xrm.Navigation.openAlertDialog(alertStrings, alertOptions).then( function success(result) { console.log(“Alert dialog closed”); }, function (error) { console.log(error.message); } … Continue reading How to Display an Alert in Power Apps using JavaScript

Download the Common Data Model Poster

Quick link to the Common Data Model poster on the CDM GitHub Repository. A nice one to print out. “Integrate and Disambiguate Data with the Common Data Model” –  https://github.com/Microsoft/CDM/blob/master/docs/CDMPoster_a3.pdf  

Adding a Database to an Existing PowerApps Environment

To add a database to an existing PowerApps environment, do the following. Log into https://admin.powerapps.com/ and go to Environments, then select the environment. You will see a Create my Database button. Click it: You will see below: Select a Currency and Language, then click Create my Database: You will see “provisioning database”: Once complete, it will look like below: Go to https://make.powerapps.com/. Select the environment, and you will see the entities installed:  

Convert a PowerApps Trial to Production

To convert a PowerApps environment from a Trial to Production, log into https://admin.powerapps.com/ and go to Environments. Select the environment: On the right, click the Convert button: You will be prompted, click Confirm: Once complete, you will see the message “This environment was converted to production”: On the Environments page, the type will now show as Production:  

Register a Function OnLoad of a SubGrid in Dynamics 365 Power Apps

In this post, we will show how to register a function that runs on the loading of a subgrid in Dynamics 365. Consider the Contacts subgrid, of which the control is called “Contacts”: We can write code to get the control below using the formContext: var subgrid = formContext.getControl(“Contacts”); Now, in order to add a function, we use the addOnLoad method. Let’s add a function on the fly here: subgrid.addOnLoad(function() … Continue reading Register a Function OnLoad of a SubGrid in Dynamics 365 Power Apps

Filtering Subgrids in Dynamics 365 Power Apps with setFilterXml

Subgrids in Dynamics 365 allow us to do several things with JavaScript. In this post, we will look at filtering a subgrid using setFilterXml. Note this appears to be an unsupported method, please check the Microsoft documentation to see if this becomes supported. Let’s look at the Contacts subgrid on the Account entity: Note the Contacts subgrid is called Contacts: The subgrid is a control, and we can get it … Continue reading Filtering Subgrids in Dynamics 365 Power Apps with setFilterXml

Client Side Validation for Dynamics 365 and Power Apps Forms With JavaScript and Business Rules

In Dynamics 365 and Power Apps, when we create forms we will probably require users to fill out certain fields. Fields are defined as Business Required, Business Recommended, and Optional. Required fields mean the user needs to enter data into the field before a record can be saved. The Dynamics 365 Power Platform field definition allows us to set which types of fields fall into which category. Once these are … Continue reading Client Side Validation for Dynamics 365 and Power Apps Forms With JavaScript and Business Rules