Skip to content

Thoughts, trends and insights

How-to Videos

Microsoft Dynamics 365 Business Central Connector Tool Overview

Microsoft Dynamics 365 Business Central Connector Tool Introduction

The Microsoft Dynamics 365 Business Central Connector can send and retrieve data between BPA Platform and your Dynamics 365 Business Central installation. This allows for data to be synchronised between Dynamics 365 Business Central and third-party systems that it does not normally connect with.

This video looks at how to Configure the Tool for Cloud based or On-premises deployments of Microsoft Dynamics 365 Business Central. It also briefly looks at how the Tool can be used in wider business processes with BPA Platform.

Microsoft Dynamics 365 Business Central Connector Tool Overview

The Microsoft Dynamics 365 Business Central Connector can send and retrieve data between BPA Platform and your Dynamics 365 Business Central installation.

This allows for data to be synchronised between Dynamics 365 Business Central and third-party systems that it does not normally connect with.

Whether Dynamics 365 Business Central has been deployed in the cloud or on-premises, you can choose to locate the Microsoft Dynamics 365 Business Central Agent on any machine accessible by the BPA Platform server or on the server itself.

All communication uses XML and the Connector can be used to map BPA Platform data to Dynamics 365 Business Central objects and operations.

XML responses received back from the Dynamics 365 Business Central API can be saved and used by other BPA Platform tools for further processing.

Standard operations of READ, ADD, UPDATE, and DELETE are supported as well as custom operations for specific objects. (Search, post, SHIP AND INVOICE, make invoice make order.

All objects available from the Dynamics 365 Business Central API are supported, including codeunits, pages, and queries.

Chapter: Global Configuration

In BPA Platform, under system, tools, data connectors, let’s double click to open the connector configuration.

The global configuration for the Microsoft Dynamics 365 Business Central Connector is used to create connections to the Dynamics 365 Business Central Agent.

When a connection is created, the available objects and fields of your Dynamics 365 Business Central installation are retrieved.

Let’s click Add to create a connection, and on the general node, type a unique Connection Name.

Enabling Update Objects and Operations allows the schema in BPA Platform to be refreshed when an update is made in the API itself, such as when upgrading to new version of Dynamics 365.
The General node determines which agent this global connection is for. In this instance, we will leave this option unchecked.

The agent connection node contains a brief summary of the connection.

In the general node, you can enter the IP address or hostname of the machine where the Dynamics 365 Business Central Agent is installed. In this instance, as it’s on the same machine as BPA Platform, we can enable Use Localhost.

Click show advanced options. In the advanced node, you can set a custom port number and it allows you to set the protocol to HTTPS if you require. In this instance, we don’t require these options.

We can use Test Connection to ensure the Microsoft Dynamics 365 Business Central Connector can communicate to the Agent successfully.

The Business Central Connection node provides a brief summary of the configured connection.

The Deployment Type node determines the connection for either Cloud or On-premises deployments. We will select Cloud.

Let’s look at the cloud connection, This node provides a brief summary of the configured connection Dynamics 365 Business Central in the cloud.

In the general node, you can choose to create separate environments, for example, for production and “live” purposes. To connect to such an environment, select Specify Environment and enter the environment name in the box. For this demonstration, we are connecting to our sandbox demo environment.

Connection URL shows the URL the Agent uses to connect to this environment and API. Then click Authorise and enter your Microsoft credentials.

Use Test Connection to ensure the Dynamics 365 Business Central Agent can connect to the database
successfully.

Log Out disconnects the Agent from the API.

About the Select Company Node:

Use the Select Company node to choose the Dynamics 365 Business Central database this Agent is specifically monitoring and click apply. If your Dynamics 365 Business Central Agent is installed on a machine hosting more than one company database, you must create a separate global connection for each database you want tasks to access. Then click OK.

We will now look at creating an on-premises connection. Click add and give it a name. In agent connection, you can see a brief summary of the connection.

In the General Node:

The Connection Agent Server, you can enter the IP address or hostname of the machine where the Dynamics 365 Business Central Agent is installed. In this instance, as it’s on the same machine as BPA Platform, we can enable Use Localhost.

Click show advanced options. In the advanced node, you can set a custom port number and it allows you to set the protocol to HTTPS if you require. In this instance, we don’t require these options.

We can use Test Connection to ensure the Microsoft Dynamics 365 Business Central Connector can communicate to the Agent successfully.

The Business Central Connection node provides a brief summary of the configured connection.

On the Deployment Type node, we will set the connection as on-premises.

The on-premises connection node gives a brief summary of the connection.

On the on-premises general node, we can provide the Hostname or IP address of the machine hosting the Dynamics 365 Business Central client. In this instance, we are using localhost.

In Server Instance, enter your organisations configured name for this instance. By default, the connection is over HTTP and port 7048. If the server instance has been set up to use HTTPS or a different port, enable Show Advanced Options.

In the advanced node, you can set a custom port number and it allows you to set the protocol to HTTPS if you require. In this instance, we don’t require these options.

The URL to the Dynamics 365 Business Central on-premises API is automatically built from the configuration we have entered.

Specifying Database Credentials:

You must provide the Username and Password allocated to the Dynamics 365 Business Central Agent. They must allow full access to the company database. Domain credentials can be used if required.

Use Test Connection to ensure the Dynamics 365 Business Central Agent can connect to the database successfully.

TIP: After changing any parameter on this page, use Test Connection in the General node to ensure successful communication is maintained.

In the Select Company Node, Use the Select Company node to choose the Dynamics 365 Business Central database this Agent is specifically monitoring nd click apply.

If your Dynamics 365 Business Central Agent is installed on a machine hosting more than one company database, you must create a separate global connection for each database you want tasks to access.

Then click ok to complete this configuration. And ok again to close the dialogue box.

Chapter: Step Configuration

Let’s open our example task.

Here we have a Database Query ODBC and Convert XML to Recordset step. If you wish to map BPA Platform Recordsets, you will need a Convert Recordset to XML or Transform Data step as the Microsoft Dynamics 365 Business Central connector requires XML as an input.

Let’s Click and drag the Connector from the Task Browser into the design area and provide a meaningful Name for this step.

In the General tab is where you can choose the BPA Platform data source to be mapped to the Dynamics 365 Business Central objects. The data source must be in XML form.

Let’s look at the options;

The Data source can be:

No data source — which will require BPA Platform variables in place of the XML or recordset objects’ fields.

A Task step — this can be set to an available BPA Platform XML data source.

In this example, in the dropdown we will select Output XML from Convert Recordset XML.

Or a Custom schema –

You can define the schema of the XML that is used as the input data source for this step. The
Microsoft Dynamics 365 Business Central Connector tool uses the industry standard XSD format.
This can be imported, or copied and pasted into the configuration box.

For Input source variable you can specify the BPA Platform variable that contains the XML data at runtime.

In the Connection Tab, you can specify the connection you have previously configured.

You can also use a BPA Platform variable or formula to create a dynamic connection, see the documentation for more information on this.

In the mapping tab, we can define links between the data source XML and those required by
Dynamics 365 Business Central.

The Object drop-down shows the Dynamics 365 Business Central objects. And the Operations drop-down shows the operations available for the selected Object.

In this example, we will use a customer object, and in operation select add. We will now expand the trees.

Here, the left-hand XML tree structure shows the data source fields that are available for mapping.

On the right-hand XML tree you can see the input fields for the selected Object and Operation.

Creating Mappings

Mappings are created by dragging and dropping a data source field (left) onto its corresponding Business Central Connector input field (right). Only linked fields are used in the output XML.

BPA Platform formulas and variables can be included in the source data even when using a Task step or Custom schema — drag them from the BPA Platform Browser to the data source’s XML; these can then be linked to the relevant input fields.

Each operation has an additional field, SupplementaryReference, which allows for traceability when transferring data from one place to another.

You can choose to map any field to SupplementaryReference to assist with checking where the data originated from or at what time the data transfer occurred.

In this example, we will map date_modified to supplementraryReference. and we will now map the other fields we require.

The Advanced Translations (XSLT) tab shows the XSLT generated for the links that are created. Use Enable Free Type Mode to directly edit the XSLT

If new fields, objects, and operations have been added to your Dynamics 365 Business Central instance after this task step was originally created, use Schema Refresh to make the latest API metadata available for use. Uncheck as this is not required in this example and we will go back to the design tab.

Using Filters with Objects

When using SEARCH operations, you can make use of filters to limit the data involved. At runtime, these fields are treated as “where clauses”.

Nominated fields must be mapped to be included in the output XML. You add filter conditions by right-clicking the output XML field, and selecting Set as Filter. By default, all filters are set to “equal to”.

NOTE: If your Dynamics 365 Business Central installation makes use of web services the codeunits, pages, and queries are also displayed in the Objects drop-down in the Mapping tab — and are shown with (Service) after the object name.

The Options tab allows you to define how errors in this step are handled at task runtime. If an error occurs, you can decide whether the step should Continue processing, or terminate the step immediately.

If the step is aborted, you can choose to Continue processing onto the next step in the task, or terminate the whole task immediately. By allowing the task to Continue, you can use the error XML received back in a Save File step for investigation purposes, for example. Click ok to close this step and we will link the steps.

And that’s it for this BPA Platform tool overview video, call us for further information or visit www.codelessplatforms.com.

Thanks for watching.


White Paper - Microsoft Dynamics 365 Business Central Connector

White Paper - Microsoft Dynamics 365 Business Central Connector

The Microsoft Dynamics 365 Business Central Connector v1.2 Technical Overview introduces you to the tool. Installed as an add-on to BPA Platform, this tool provides direct communication between BPA Platform and Dynamics 365 Business Central.

Business Process Automation CTA

Got a question?

Send us your questions and we will provide you with the information and resources that you need.

Ready to Talk?

You don’t learn everything in life by reading a manual, sometimes it helps to get in touch

Phone: +44 (0) 330 99 88 700

Want more information?

Fill in your details below and one of our account managers will contact you shortly.

    First Name

    Last Name

    Business Email

    Phone

    Tell us your requirements