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

Create Data Export Profile Failed Error with Data Export Service

When using the Data Export Service, you may run into the following error when creating a new profile: “Create Data Export Profile failed. Following tables or stored procedures or user-defined types with the destination prefix {0} already exist in the database: TABLE : dbo.AttributeMetadata,dbo.GlobalOptionSetMetadata,dbo.OptionSetMetadata,dbo.StateMetadata,dbo.StatusMetadata,dbo.TargetMetadata. TYPE : dbo.StateMetadataList,dbo.StatusMetadataList,dbo.OptionSetMetadataList,dbo.TargetMetadataList,dbo.AttributeMetadataList. PROCEDURE : dbo.UpsertAttributeMetadata,dbo.UpsertGlobalOptionSetMetadata,dbo.UpsertOptionSetMetadata,dbo.UpsertStateMetadata,dbo.UpsertStatusMetadata,dbo.UpsertTargetMetadata. . Please delete these database objects before you create the profile.” In this case, these tables already exist in the … Continue reading Create Data Export Profile Failed Error with Data Export Service

Deleting a PowerApps Environment

To delete a PowerApps environment, log into https://admin.powerapps.com/ and go to Environments, then select the environment. Click Delete: Enter the name of the environment to delete: You will see: The environment will then be deleted.  

Retrieve and RetrieveMultiple JavaScript using Xrm.WebApi

Let’s look at how to use Retrieve and RetrieveMultiple using JavaScript and the Xrm.WebApi. Consider the scenario where we have an account: We can run this code in browser debugger. Hit F12 and let’s run this code: We get the output: And if we want to do a RetrieveMultiple: We get:  

How to Embed a Canvas App in a Model Driven App in PowerApps

In PowerApps, there are 2 types of apps, Canvas Apps and Model Driven Apps. If you are new to PowerApps, you can learn more about the differences here. In short, Canvas Apps are designed to build a flexible user interface that connects to various data sources easily, whereas model driven apps are designed with an out of the box business model that you can easily extend and integrate. In this … Continue reading How to Embed a Canvas App in a Model Driven App in PowerApps

Adding a JavaScript Function to a Field in Dynamics 365 Power Apps On Load with addOnChange

In this post we will look at how to add a function to field in Dynamics 365 / Power Apps, so when a form loads, the function will run on change of the field. We can do this by using addOnChange. Let’s say I have a field called My Optional Field (new_myoptionalfield) which is on an entity called My New Entity. The field is on the main form: Now let’s say … Continue reading Adding a JavaScript Function to a Field in Dynamics 365 Power Apps On Load with addOnChange