Using formContext in Dynamics 365

In Dynamics 365, the formContext provides a reference to a form or form item through JavaScript. The formContext is part of executionContext, and replaces Xrm.Page which is deprecated in version 9+ of Dynamics 365. The form context object model looks like: Let’s go through an example of using the formContext. Let’s add a script to a form when the form loads, for example, a Contact entity form. Let’s add a … Continue reading Using formContext in Dynamics 365

Hiding the Plus Button on a Subgrid in Dynamics 365

In Dynamics 365, on subgrids there is a plus button which can be used to add records. In some cases, you may want to hide this button from users. For example, let’s say on the Account form you would like to hide the + button on the Contacts subgrid: To do this, we can use the Ribbon Workbench application. Let’s first create a new solution and add the Contact entity … Continue reading Hiding the Plus Button on a Subgrid in Dynamics 365

Calling a Dynamics 365 Action from JavaScript using Xrm.WebApi.online.execute

In this post, we will continue with our example of calling a Dynamics 365 action from JavaScript, this time using the Xrm.WebApi. In the previous example, on saving a case, we would call an action to send an email to a developer if the title of the case contained the word “bug”. The action would accept 2 inputs, a “to” user and a “from” user to send the email to … Continue reading Calling a Dynamics 365 Action from JavaScript using Xrm.WebApi.online.execute

Copying a Dynamics 365 Organization into another Org

In this post, we will look at how to copy a Dynamics 365 instance into a sandbox instance. For example, you may have a production environment with production data and customizations that you would like to copy down to a development instance. In our case, we have Contoso, which is our production organization, and Contoso DEV, our development org. We will select Contoso to copy from. You will see the … Continue reading Copying a Dynamics 365 Organization into another Org

Updating Dynamics 365 Records using Export and Import with Excel

Following on from a previous example, we can use Excel to update records in Dynamics 365 by exporting the records to an Excel file. To do this, select the records you would like to export in Advanced Find: Export:   Open the downloaded spreadsheet and make an update to an account: Save the Excel file. Create a new Import in Dynamics 365 under Data Management->Imports: Select No to Allow Duplicates: … Continue reading Updating Dynamics 365 Records using Export and Import with Excel

How to Copy Records from One Dynamics 365 Org to Another using Export and Import

A simple way to copy data from one Dynamics 365 organization to another is to use the export and import functionality. Let’s say we have created some new accounts in the source system. We will create an advanced find to show us accounts created today so we can export them: Click Export Accounts: Export to Static Worksheet: This will download an xlsx spreadsheet. Open the file: Optionally, click on the … Continue reading How to Copy Records from One Dynamics 365 Org to Another using Export and Import

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

Understanding Intersect Entities and N:N Relationships in Dynamics 365

In Dynamics 365, there are 3 different types of relationships: one to many (1:N) many to one (N:1) many to many (N:N) When a many to many relationship is created by using the standard method of clicking “New Many to Many Relationship”, an “intersect” entity is created that allows for the relationship to exist. An out of the box example of a many to many relationship is systemuserroles, which maps … Continue reading Understanding Intersect Entities and N:N Relationships in Dynamics 365

Enabling Hybrid Experience for Missing Functionality in Unified Interface in Dynamics 365

In the Dynamics 365 Unified Interface, certain pieces of functionality are currently not available that exist in the legacy web client. These include (at the time of writing): Advanced Find Bulk Delete Merge Records Record Sharing Set Personal Options For example, in the web client, we can see the Advanced Find icon: Which opens Advanced Find: If we open Customer Service Hub, which uses the Unified Interface, we do not … Continue reading Enabling Hybrid Experience for Missing Functionality in Unified Interface in Dynamics 365

Modifying Lookup Fields and Lookup Views in Dynamics 365

In Dynamics 365, we can add lookup fields to forms. When the field is selected, it will display certain information regarding the data. In this post we will look at how this works. Let’s look at the Account field on an Opportunity form. Note the fields displayed and the order – Name, Email, Phone Number: Selecting Look Up More Records, we see the view is Account Lookup View: If we … Continue reading Modifying Lookup Fields and Lookup Views in Dynamics 365