Skip to content

Importing Custom Data into Dynamics 365 Business Central

This task will create or update records of any type in Dynamics 365 Business Central. It is designed to be used to upload data to custom API endpoints that have been created in Dynamics 365 Business Central, but it can also call standard endpoints that we don't have a task for in Zynk. The data must be supplied in the Dynamics 365 Business Central Custom Data XML format.

Records will be matched based on the Id or ExternalId elements in the XML. If the 'Match Records On' setting is populated, the fields specified here will also be used for matching. If a match is found, the existing record will be updated. If not, a new record will be created.

Settings

API Endpoint

Required

This setting consists of several child settings, which are documented below. Together, they determine the API URL that will be called.

A sample of what the URL will look like will be displayed at the top of this setting group. The <environment> and <company_id> parameters will be determined by the selected connection.

Note

The endpoint must support the GET method, and at least one of the POST or PATCH methods.

API Group

Optional

Enter the API Group that was configured when setting up the custom API in Dynamics 365 Business Central. If you want to call a standard API endpoint using this task, this setting should be left blank.

API Publisher

Optional

Enter the API Publisher that was configured when setting up the custom API in Dynamics 365 Business Central. If you want to call a standard API endpoint using this task, this setting should be left blank.

API Version

Optional

Enter the API Version that was configured when setting up the custom API in Dynamics 365 Business Central. If you want to call a standard API endpoint using this task, this setting should be set to v2.0.

Resource

Required

The resource type to create/update via the API. This is also known as the 'entity set name' when configuring a custom API in Dynamics 365 Business Central.

Tenant ID or User Domain Name

Optional

If the endpoint requires a tenant ID or user domain name to be specified, enter it here.

Create

Required

Set to true if the endpoint supports the POST method, and you would like the task to create new records in Dynamics 365 Business Central when no match is found.

Update

Required

Set to true if the endpoint supports the PATCH method, and you would like the task to update existing records in Dynamics 365 Business Central when a match is found.

Dynamics 365 Business Central Connection

Required
The connection to Dynamics 365 Business Central to use. See the Connecting to Dynamics 365 Business Central article if you require more information on how to create/manage connections.

Fail File

Required
The name of a file for records that fail to import to be output to. The data will be in the same XML format as the input file.

Input File

Required
The file containing the records that you want to import into Dynamics 365 Business Central. The records must be supplied in the XML format shown below.

Success File

Required
The name of a file for successfully imported records to be output to. The data will be in the same XML format as the input file.

Match Records On

Optional
The list of fields to use to try and find an existing record in Dynamics 365 Business Central which matches with the record in the input file. These settings will only be used if an Id is not provided in the input file, and the external ID is not found in the truth table. When multiple fields are selected, only records where the value of all the fields match will be considered a match.

Prevent Reprocessing

Required
Set this to 'True' to check the value specified in the ExternalId element in the XML against the truth table to see if it has already been processed, and if so skip the record.

Zynk Settings

See Common Task Settings

Examples

Sample input file, for full documentation see Dynamics 365 Business Central Custom Data XML:

<?xml version="1.0" encoding="utf-8"?>
<CustomRecords xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <CustomRecord>
    <Id>54f4fd40-34bc-ed11-9a88-6045bd0cf997</Id>
    <ExternalId>5230</ExternalId>
    <Field Name="vendorNo" Type="String">10000</Field>
    <Field Name="name" Type="String">ECA</Field>
    <Field Name="employees" Type="Integer">10</Field>
    <Field Name="totalSpend" Type="Float">1450.85</Field>
    <Field Name="created" Type="Date">2026-05-01T09:00:00</Field>
    <Field Name="onlineReceipts" Type="Boolean">true</Field>
    <Field Name="contactName" />
  </CustomRecord>
</CustomRecords>