top of page

Merging the Dynamics Customer Engagement and Business Central Experience

Updated: Mar 8, 2023

March17, 2021

Customers adopting the Microsoft Business Applications ecosystem are often looking for a streamlined user experience with little effort in integrating these first-party apps. As a Microsoft Business Central Gold Partner, we strive to architect such experiences leaning on Microsoft’s own Power Platform to be the overlaying technology.

One example scenario exists in Lead-to-Cash situations. A sales-person using Customer Engagement and viewing an Invoice should have visibility into accounting data around the invoice with having to switch between programs or email accounting.

This can be accomplished by creating and embedding a Canvas App in the Customer Engagement model-driven app form. The Canvas App can consume a connector from your Business Central environment and display the appropriate data.

Note: the connector consumed was a custom connector built to leverage the Business Central web services API. For more on why we used a customer connector, see my blog on “Integration Options for model-driven apps (Dataverse) and Business Central”.

Creating and Embedding a Canvas

In the maker experience, create a solution and add the Invoice table and the Invoice form.

Modify your form. For this type of action, you must switch to the classic form editor experience.’

Add the description field to a section by itself. In order to embed a Canvas App you can choose any text field on a form.

Select the Description field, click “Change Properties”. Click on the Controls tab. Click “Add Control”.

Turn all the Control experiences to this control. Then click “Customize”.

This will open up the Maker environment for Canvas App. It will add by default:

  1. Connection to the Invoice table in Dataverse

  2. Form control connected to this connection

  3. The item in the Form by default is the current Invoice record

  4. A custom object called ModelDrivenFormIntegration for interacting with the record and form in context

Click the Data control from the left-hand menu bar and click the Business Central Customer connector.

Load data from the BC Sales Invoice and BC Sales Invoices Lines into Collections.

We had to set a timer to fire upon App load to perform the retrieval. This was due to some issues with the App not loading a Collection completely upon App load. Set the code for Timer OnTimerEnd as follows:

Add a “Data table” control for the BC Sales Invoice.

Add a “Data table” control for the BC Sales Invoice Lines.

For each of the data controls, I set the visible to show ERPData variable so the controls only load once data is loaded.

Save and publish the Canvas App.

And that’s it! With the ability to add any of the fields retrieved from the custom control a user can view ERP data right within the Dynamics 365 for Customer Engagement experience.

This blog is part 3 of 3 of a series on creating a merged experience between Microsoft Dynamics 365 for Customer Engagement and Microsoft Dynamics 365 for Business Central.

The 3 part blogs can be found here:

  1. Integrating Business Central with Dataverse

  2. Building a Business Central Connector

  3. Merging the Customer Engagement and Business Central Experience

For any additional questions, please contact Journeyteam at (801) 565-9199.

Written By:

Valter Herman, CRM Principal Solutions Architect (720) 432-7919


Derek Finlinson, CRM Developer


bottom of page