# mulesoft Microsoft Dynamics 365 Business Central Connector - Full Documentation --- product: Microsoft Dynamics 365 Business Central Connector version: 1.0 is-latest-version: true --- # Microsoft Dynamics 365 Business Central Connector 1.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Microsoft Dynamics 365 Business Central (Microsoft Dynamics 365 Business Central Connector) enables you to manage entities for your companies in Microsoft Dynamics 365 Business Central. For information about compatibility and fixed issues, refer to the Microsoft Dynamics 365 Business Central Connector Release Notes. ## Before You Begin To use this connector, you must be familiar with: - The Microsoft Dynamics 365 Business Central API - Anypoint Connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - How to create a Mule app using Anypoint Studio Before creating an app, you must have: - Credentials to access the Microsoft Dynamics 365 Business Central target resource - Anypoint Platform - Anypoint Studio or Anypoint Code Builder ## Common Use Cases for the Connector Some common use cases for Microsoft Dynamics 365 Business Central Connector include: - Viewing sales order statuses on an account - Creating a Business Central sales order when an opportunity is closed in Salesforce - Keeping Salesforce accounts and Business Central customers in sync ## Connection Types Microsoft Dynamics 365 Business Central connections use the following authentication types: - Basic Auth Uses access keys. - OAuth2 Uses a user’s Microsoft 365 or Azure AD credentials. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Microsoft Dynamics 365 Business Central Connector Reference](https://docs.mulesoft.com/microsoft-dynamics-365-business-central-connector/latest/microsoft-dynamics-365-business-central-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Microsoft Dynamics 365 Business Central Connector version: 1.0 is-latest-version: true --- # Microsoft Dynamics 365 Business Central Connector 1.0 Examples > For the full documentation index, see: https://docs.mulesoft.com/llms.txt These examples show you how to use Microsoft Dynamics 365 Business Central Connector to perform the following actions: - [List Items](#list-items) - [Get an Item](#get-item) - [Add an Item](#add-item) - [Update an Item](#update-item) - [Delete an Item](#delete-item) - [Link Records to Related Entities](#link-records) ## Configure a Business Central Connection Specify the Business Central connection field values to secure connections. To do this: - [Create a configuration file for a Business Central connection.](#create-config-file) - [Configure the Business Central connection global elements.](#configure-business-central-global) - [Configure a global element for the properties file.](#configure-global) ### Create a Configuration File for a Business Central Connection Create a configuration file that includes properties for a Business Central connection: 1. Create a file named `mule-app.properties` in the `/src/main/resources/` folder. 2. In the `mule-app.properties` file, create a set of properties for either `Basic Auth` or `OAuth2`, similar to the ones that follow, replacing the bracketed text (including the brackets) with the correct values for your configuration: \# Config config.tenantId= config.environment=Production # OAuth2 Configuration oauth.client.id= oauth.client.secret= oauth.callbackPath=callback # Api api.companyId= # Static Configuration config.baseUri=https://api.businesscentral.dynamics.com/v2.0/${config.tenantId}/${config.environment}/api/v2.0/ oauth.authUrl=https://login.microsoftonline.com/${config.tenantId}/oauth2/v2.0/authorize oauth.tokenUrl=https://login.microsoftonline.com/${config.tenantId}/oauth2/v2.0/token oauth.externalCallbackPath=http://localhost:${http.port}/${oauth.callbackPath} For more information about creating a properties file, refer to [Configuring Property Placeholders](https://docs.mulesoft.com/mule-runtime/latest/mule-app-properties-to-configure). #### Find your Company ID To find your company ID, follow these steps: 1. Log in to your Business Central account and navigate to the **Companies** tab. 2. Select the company you want to use. ![Companies tab window](/mulesoft/current/en-us/microsoft-dynamics-365-business-central-connector/latest/_images/company-id-1.png) 3. Click the question mark button on the top right corner and select **Help & Support**. 4. Under the troubleshooting section, click **Inspect pages and data**. 5. In the inspector, you can enter `Id` in the search field and the first result contains your company ID. ![Getting company ID](/mulesoft/current/en-us/microsoft-dynamics-365-business-central-connector/latest/_images/company-id-2.png) You can copy this ID and paste it into the `src/main/resources/mule-app.properties` file for the property `api.companyId=`. ### Configure the Business Central Connection Global Elements Configure global elements for either `Basic Auth` or `OAuth2`: 1. Create a new Mule project. 2. In the **Mule Palette** view, click **Search in Exchange** and enter `microsoft dynamics 365 business central`. 3. Add **Microsoft Dynamics 365 Business Central Connector** to the **Selected modules** section and click **Finish**. 4. Click the **Global Elements** tab and click **Create**. 5. Select **Connector Configuration > Basic Auth** or **Connector Configuration > OAuth2** and click **OK**. 6. Enter the following values: - Enter the following values for Basic Auth:
FieldValue

Name

Basic Auth

Username

Username used to authenticate the requests

- Enter the following values for OAuth2:
FieldValue

Name

OAuth2

Consumer Key

OAuth consumer key, as registered with the service provider

Consumer Secret

OAuth consumer secret, as registered with the service provider

Listener Config

Configuration for the HTTP listener that listens for requests on the access token callback endpoint

Callback Path

Path of the access token callback endpoint

Authorize Path

Path of the local HTTP endpoint that triggers the OAuth dance

7. Click **OK**. ### Configure a Global Element for the Properties File Configure a global element for the `mule-app.properties` file so that Mule knows where to find it: 1. Click the **Global Elements** tab and click **Create**. 2. In the **Choose Global Type** dialog, select **Configuration properties** and click **OK**. 3. In the **File** field, enter `mule.app.properties`. 4. Click **OK**. ## List Items This Mule flow lists all items. The first flow uses the following operations: - **HTTP Listener** Accepts data from HTTP requests - **Parse Template** Processes a [template](#example-template) The second flow uses the following operations: - **HTTP Listener** Accepts data from HTTP requests - **List Entities** Retrieves a list of entities - **Set Payload** Defines how Mule sets the payload output application/json --- payload.payload map (item) -> { "id": item.id, "name": item.displayName } ![Studio Flow for the List Entities Operation](/mulesoft/current/en-us/microsoft-dynamics-365-business-central-connector/latest/_images/list-items.png) ### Template for this Example You can use this HTML template to create a file and copy the content to test the application using a graphical interface:
### XML for This Example Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ### Steps for Running This Example 1. Verify that your connector is configured. 2. Save the project. 3. From a web browser, test the application by entering `http://localhost:8081/`. You should see the **List Items** tab expanded with a **List** button. ![List button](/mulesoft/current/en-us/microsoft-dynamics-365-business-central-connector/latest/_images/list-button.png) 4. Click on the **List** button. You should see an alert showing a sample JSON of the response listing the ID and display names of all items. ![Response from List button](/mulesoft/current/en-us/microsoft-dynamics-365-business-central-connector/latest/_images/list-response.png) ## Get an Item This Mule flow retrieves an item. The first flow uses the following operations: - **HTTP Listener** Accepts data from HTTP requests - **Parse Template** Processes a [template](#example-template) The second flow uses the following operations: - **HTTP Listener** Accepts data from HTTP requests - **Get Entity** Retrieves a single entity by its ID if it exists ![Studio Flow for the Get Entity Operation](/mulesoft/current/en-us/microsoft-dynamics-365-business-central-connector/latest/_images/get-item.png) ### Template for this Example You can use this HTML template to create a file and copy the content to test the application using a graphical interface:


### XML for This Example Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ### Steps for Running This Example 1. Verify that your connector is configured. 2. Save the project. 3. From a web browser, test the application by entering `http://localhost:8081/`. 4. Click on the **Get Item** form. 5. After the form shows up, fill in a valid item ID, for example, a previous item ID from **List Items**. ![Get Item form](/mulesoft/current/en-us/microsoft-dynamics-365-business-central-connector/latest/_images/get-item-form.png) 6. Click **Get**. You should see an alert showing a JSON with all the details available for this item, such as its number, type, and price. ![Response from Get Item form](/mulesoft/current/en-us/microsoft-dynamics-365-business-central-connector/latest/_images/get-item-response.png) ## Add an Item This Mule flow adds an item. The first flow uses the following operations: - **HTTP Listener** Accepts data from HTTP requests - **Parse Template** Processes a [template](#example-template) The second flow uses the following operations: - **HTTP Listener** Accepts data from HTTP requests - **Create Entity** Creates a single new entity ![Studio Flow for the Create Entity Operation](/mulesoft/current/en-us/microsoft-dynamics-365-business-central-connector/latest/_images/add-item.png) ### Template for this Example You can use this HTML template to create a file and copy the content to test the application using a graphical interface:
At most 20 characters long
At most 100 characters long


Created ID:
### XML for This Example Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ### Steps for Running This Example 1. Verify that your connector is configured. 2. Save the project. 3. From a web browser, test the application by entering `http://localhost:8081/`. 4. Click on the **Create Item** form. 5. After the form shows up, fill in an item number you want to create and its display name. ![Create Item form](/mulesoft/current/en-us/microsoft-dynamics-365-business-central-connector/latest/_images/create-item-form.png) 6. Click **Create**. You should see an alert showing the details of your newly created item. The newly created item ID shows up on the bottom of the form, which you can use in future operations. ![Response from Create Item form](/mulesoft/current/en-us/microsoft-dynamics-365-business-central-connector/latest/_images/create-item-response.png) ## Update an Item This Mule flow updates an item. The first flow uses the following operations: - **HTTP Listener** Accepts data from HTTP requests - **Parse Template** Processes a [template](#example-template) The second flow uses the following operations: - **HTTP Listener** Accepts data from HTTP requests - **Get Entity** Retrieves a single entity by its ID if it exists - **Update Entity** Updates a single entity by its ID ![Studio Flow for the Update Entity Operation](/mulesoft/current/en-us/microsoft-dynamics-365-business-central-connector/latest/_images/update-item.png) ### Template for this Example You can use this HTML template to create a file and copy the content to test the application using a graphical interface:

At most 100 characters long


### XML for This Example Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ### Steps for Running This Example 1. Verify that your connector is configured. 2. Save the project. 3. From a web browser, test the application by entering `http://localhost:8081/`. 4. Click on the **Update Item** form. 5. After the form shows up, type in the ID of the item you want to update and a new name to update the item with. ![Update Item form](/mulesoft/current/en-us/microsoft-dynamics-365-business-central-connector/latest/_images/update-item-form.png) 6. Click **Update**. You should see an alert showing the new details of the updated item. Notice that the name is changed for the item you updated. ![Response from Update Item form](/mulesoft/current/en-us/microsoft-dynamics-365-business-central-connector/latest/_images/update-item-response.png) ## Delete an Item This Mule flow deletes an item. The first flow uses the following operations: - **HTTP Listener** Accepts data from HTTP requests - **Parse Template** Processes a [template](#example-template) The second flow uses the following operations: - **HTTP Listener** Accepts data from HTTP requests - **Delete Entity** Deletes a single entity by ID - **Set Payload** Defines how Mule sets the payload Item deleted ![Studio Flow for the Delete Entity Operation](/mulesoft/current/en-us/microsoft-dynamics-365-business-central-connector/latest/_images/delete-item.png) ### Template for this Example You can use this HTML template to create a file and copy the content to test the application using a graphical interface:

This action is irreversible.
### XML for This Example Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule app: ```xml ``` ### Steps for Running This Example 1. Verify that your connector is configured. 2. Save the project. 3. From a web browser, test the application by entering `http://localhost:8081/`. 4. Click on the **Delete Item** form. 5. After the form shows up, type in the ID of the item you want to delete. ![Delete Item form](/mulesoft/current/en-us/microsoft-dynamics-365-business-central-connector/latest/_images/delete-item-form.png) 6. Click **Delete**. You should see an alert saying that the item was deleted. ![Response from Delete Item form](/mulesoft/current/en-us/microsoft-dynamics-365-business-central-connector/latest/_images/delete-item-response.png) ## Link Records to Related Entities You can establish relationships between entities by referencing related record IDs in navigation properties. Use the related entity’s ID field to create the association. ### Example: Link a Contact to a Customer When creating a Contact, reference the Customer ID to establish the relationship: ```dataweave output application/json --- { type: "Person", displayName: payload.ContactName, email: payload.EmailAddress, customerId: payload.CustomerId } ``` The `customerId` field links the Contact to the specified Customer record. Check your Business Central API metadata for available navigation properties and relationship fields for each entity type. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Microsoft Dynamics 365 Business Central Connector version: 1.0 is-latest-version: true --- # Microsoft Dynamics 365 Business Central Connector 1.0 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Configurations --- ### Config #### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Connection

Connection types for this configuration.

x

Default company ID

String

Default ID of the company. If left blank, each operation or source must specify the company ID separately.

Response Timeout

Number

How long Mule waits for a response to complete before the request times out.

60

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Response Timeout field.

SECONDS

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

How the connector streams request content to the remote service:

  • AUTO (default)

    Connector automatically uses the best streaming strategy based on the request content.

  • ALWAYS

    Connector always streams the request content.

  • NEVER

    Connector does not stream the request content.

AUTO

Name

String

ID used to reference this configuration.

x

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.

#### Connection Types ##### Basic Auth Connection Provider ###### Parameters
NameTypeDescriptionDefault ValueRequired

Default Headers

Object

Default HTTP headers to include in requests.

Query Parameters

Object

Default query parameters to include in requests.

Connection Timeout

Number

How long the connector waits before timing out when establishing a connection to the remote service.

30

Connection Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Timeout field.

SECONDS

Use Persistent Connections

Boolean

Indicates whether to use persistent connections:

  • true

    Mule uses persistent connections.

  • false

    Mule closes the connection after the first request completes.

true

Max Connections

Number

Maximum number of connections to open to the backend. HTTP requests are sent in parallel over multiple connections. Setting this value too high can impact latency and consume additional resources without increasing throughput. By default, the number of connections is unlimited.

-1

Connection Idle Timeout

Number

When persistent connections are enabled, how long a connection can remain idle before Mule closes it. The value of this attribute is used only when persistent connections are enabled.

30

Connection Idle Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Idle Timeout field.

SECONDS

Proxy Config

Configures a proxy for outbound connections. A proxy element must define a host name and port attributes and can optionally define a username and a password.

Stream Response

Boolean

If this value is true, Mule streams received responses. Processing continues when all headers are parsed and the body is streamed. When enabled, the response must eventually be read because, depending on the configured buffer size, the response might not fit into the memory and processing will stop until space is available.

false

Response Buffer Size

Number

Size of the buffer that stores the HTTP response, in bytes.

-1

Base Uri

String

Parameter base URI. Each instance or tenant gets its own parameter base URI.

https://api.businesscentral.dynamics.com/v2.0/<tenantId>/<environmentname>/api/v2.0

Username

String

Username used to authenticate the requests.

x

Password

String

Password used to authenticate the requests.

Protocol

Enumeration, one of:

  • HTTP

  • HTTPS

Protocol to use for communication. If HTTPS is configured as a protocol, the user can customize the TLS/SSL configuration by defining the tls:context child element of this listener-config. If tls:context is not defined, then the default JVM certificates are used to establish communication.

HTTP

TLS Configuration

Reference to a TLS config element. This field enables HTTPS for this config.

Reconnection

What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy:

  • true

    Allow the deployment to fail.

  • false

    Ignore the results of the connectivity test.

##### OAuth2 Connection Provider Use OAuth 2.0 to delegate user authentication to the service hosting the user account. For more information, refer to [Configuring OAuth 2.0 for Connectors](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2), [Configuring OAuth 2.0 for Connectors on CloudHub](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2-cloudhub), or [OAuth Support in the SDK](https://docs.mulesoft.com/mule-sdk/latest/oauth). ###### Parameters
NameTypeDescriptionDefault ValueRequired

Default Headers

Object

Default HTTP headers to include in requests.

Query Parameters

Object

Default query parameters to include in requests.

Connection Timeout

Number

How long the connector waits before timing out when establishing a connection to the remote service.

30

Connection Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Timeout field.

SECONDS

Use Persistent Connections

Boolean

Indicates whether to use persistent connections:

  • true

    Mule uses persistent connections.

  • false

    Mule closes the connection after the first request completes.

true

Max Connections

Number

Maximum number of connections to open to the backend. HTTP requests are sent in parallel over multiple connections. Setting this value too high can impact latency and consume additional resources without increasing throughput. By default the number of connections is unlimited.

-1

Connection Idle Timeout

Number

When persistent connections are enabled, how long a connection can remain idle before Mule closes it. The value of this attribute is used only when persistent connections are enabled.

30

Connection Idle Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Idle Timeout field.

SECONDS

Proxy Config

Configures a proxy for outbound connections. A proxy element must define a host name and port attributes and can optionally define a username and a password.

Stream Response

Boolean

If this value is true, Mule streams received responses. Processing continues when all headers are parsed and the body is streamed. When enabled, the response must eventually be read because, depending on the configured buffer size, the response might not fit into the memory and processing will stop until space is available.

false

Response Buffer Size

Number

Size of the buffer that stores the HTTP response, in bytes.

-1

Base Uri

String

Parameter base URI. Each instance or tenant gets its own parameter base URI.

https://api.businesscentral.dynamics.com/v2.0/<tenantId>/<environmentname>/api/v2.0

Protocol

Enumeration, one of:

  • HTTP

  • HTTPS

Protocol to use for communication. If HTTPS is configured as a protocol, the user can customize the TLS/SSL configuration by defining the tls:context child element of this listener-config. If tls:context is not defined, then the default JVM certificates are used to establish communication.

HTTP

TLS Configuration

Reference to a TLS config element. This field enables HTTPS for this config.

Reconnection

What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy:

  • true

    Allow the deployment to fail.

  • false

    Ignore the results of the connectivity test.

Consumer Key

String

OAuth consumer key, as registered with the service provider.

x

Consumer Secret

String

OAuth consumer secret, as registered with the service provider.

x

Authorization Url

String

URL of the service provider’s authorization endpoint.

https://login.microsoftonline.com/<tenantId>/oauth2/v2.0/authorize

Access Token Url

String

URL of the service provider’s access token endpoint.

https://login.microsoftonline.com/<tenantId>/oauth2/v2.0/token

Scopes

String

OAuth scopes to request during the OAuth dance. This value defaults to the scopes in the annotation.

https://api.businesscentral.dynamics.com/.default

Resource Owner Id

String

Resource owner ID to use with the authorization code grant type.

Before

String

Name of the flow to execute immediately before starting the OAuth dance.

After

String

Name of the flow to execute immediately after receiving an access token.

Listener Config

String

Configuration for the HTTP listener that listens for requests on the access token callback endpoint.

x

Callback Path

String

Path of the access token callback endpoint.

x

Authorize Path

String

Path of the local HTTP endpoint that triggers the OAuth dance.

x

External Callback Url

String

URL that the OAuth provider uses to access the callback endpoint if the endpoint is behind a proxy or accessed through an indirect URL.

Object Store

String

Configures the object store that stores data for each resource owner. If not configured, Mule uses the default object store.

## Associated Operations - [Create Entity](#CreateEntity) - [Delete Entity](#DeleteEntity) - [Get Entity](#GetEntity) - [List Entities](#ListEntities) - [Unauthorize](#Unauthorize) - [Update Entity](#UpdateEntity) ## Associated Sources - [On New or Updated Customer](#OnNewOrUpdatedCustomerListener) - [On New or Updated Item](#OnNewOrUpdatedItemListener) - [On New or Updated Sales Order](#OnNewOrUpdatedSalesorderListener) ## Create Entity `` Creates a single new entity. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Company ID

String

ID of the company.

Entity

String

Name of the operation entity.

x

Body

Binary

x

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Custom Query Parameters

Object

Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration.

#[null]

Custom Headers

Object

Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration.

Response Timeout

Number

How long Mule waits for a response to complete before the request times out.

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Response Timeout field.

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

How the connector streams request content to the remote service:

  • AUTO (default)

    Connector automatically uses the best streaming strategy based on the request content.

  • ALWAYS

    Connector always streams the request content.

  • NEVER

    Connector does not stream the request content.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

### Output

Type

Any

Attributes Type

### For Configurations - [Config](#Config) ### Throws - DYNAMICS365-BC:BAD\_REQUEST - DYNAMICS365-BC:COMPANY\_NOT\_FOUND - DYNAMICS365-BC:CONNECTIVITY - DYNAMICS365-BC:DIALOG\_EXCEPTION - DYNAMICS365-BC:INVALID\_CREDENTIALS - DYNAMICS365-BC:INVALID\_OPTION\_ENUM\_VALUE - DYNAMICS365-BC:METHOD\_NOT\_ALLOWED - DYNAMICS365-BC:METHOD\_NOT\_IMPLEMENTED - DYNAMICS365-BC:NOT\_FOUND - DYNAMICS365-BC:RESOURCE\_NOT\_FOUND - DYNAMICS365-BC:RETRY\_EXHAUSTED - DYNAMICS365-BC:SERVER\_ERROR - DYNAMICS365-BC:STRING\_EXCEEDED\_LENGTH - DYNAMICS365-BC:TIMEOUT - DYNAMICS365-BC:UNAUTHORIZED - DYNAMICS365-BC:UNKNOWN - DYNAMICS365-BC:VALIDATION ## Delete Entity `` Deletes a single entity by ID. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Company ID

String

ID of the company.

Entity

String

Name of the operation entity.

x

Entity ID

String

ID of the entity.

x

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Custom Query Parameters

Object

Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration.

#[null]

Custom Headers

Object

Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration.

Response Timeout

Number

How long Mule waits for a response to complete before the request times out.

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Response Timeout field.

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

How the connector streams request content to the remote service:

  • AUTO (default)

    Connector automatically uses the best streaming strategy based on the request content.

  • ALWAYS

    Connector always streams the request content.

  • NEVER

    Connector does not stream the request content.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

### Output

Type

Any

Attributes Type

### For Configurations - [Config](#Config) ### Throws - DYNAMICS365-BC:BAD\_REQUEST - DYNAMICS365-BC:COMPANY\_NOT\_FOUND - DYNAMICS365-BC:CONNECTIVITY - DYNAMICS365-BC:DIALOG\_EXCEPTION - DYNAMICS365-BC:INVALID\_CREDENTIALS - DYNAMICS365-BC:METHOD\_NOT\_ALLOWED - DYNAMICS365-BC:METHOD\_NOT\_IMPLEMENTED - DYNAMICS365-BC:NOT\_FOUND - DYNAMICS365-BC:RESOURCE\_NOT\_FOUND - DYNAMICS365-BC:RETRY\_EXHAUSTED - DYNAMICS365-BC:SERVER\_ERROR - DYNAMICS365-BC:TIMEOUT - DYNAMICS365-BC:UNAUTHORIZED - DYNAMICS365-BC:UNKNOWN - DYNAMICS365-BC:VALIDATION ## Get Entity `` Retrieves a single entity by its ID if it exists. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Company ID

String

ID of the company.

Entity ID

String

ID of the entity.

x

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Entity

String

Name of the operation entity.

x

Expand properties

Array of String

Expands related entities.

Select properties

Array of String

Selects properties to return.

Custom Query Parameters

Object

Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration.

#[null]

Custom Headers

Object

Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration.

Response Timeout

Number

How long Mule waits for a response to complete before the request times out.

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Response Timeout field.

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

How the connector streams request content to the remote service:

  • AUTO (default)

    Connector automatically uses the best streaming strategy based on the request content.

  • ALWAYS

    Connector always streams the request content.

  • NEVER

    Connector does not stream the request content.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

### Output

Type

Any

Attributes Type

### For Configurations - [Config](#Config) ### Throws - DYNAMICS365-BC:BAD\_REQUEST - DYNAMICS365-BC:COMPANY\_NOT\_FOUND - DYNAMICS365-BC:CONNECTIVITY - DYNAMICS365-BC:DIALOG\_EXCEPTION - DYNAMICS365-BC:FILTER\_ERROR\_EXCEPTION - DYNAMICS365-BC:INVALID\_CREDENTIALS - DYNAMICS365-BC:INVALID\_OPTION\_ENUM\_VALUE - DYNAMICS365-BC:METHOD\_NOT\_ALLOWED - DYNAMICS365-BC:METHOD\_NOT\_IMPLEMENTED - DYNAMICS365-BC:NOT\_FOUND - DYNAMICS365-BC:RESOURCE\_NOT\_FOUND - DYNAMICS365-BC:RETRY\_EXHAUSTED - DYNAMICS365-BC:SERVER\_ERROR - DYNAMICS365-BC:TIMEOUT - DYNAMICS365-BC:UNAUTHORIZED - DYNAMICS365-BC:UNKNOWN - DYNAMICS365-BC:VALIDATION ## List Entities `` Retrieves a list of entities, applying the specified filters and search queries. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Company ID

String

ID of the company.

Page Size

Number

Page size.

50

Output Mime Type

String

MIME type of the payload that this operation outputs.

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Entity

String

Name of the operation entity.

x

Expand properties

Array of String

Expands related entities.

Select properties

Array of String

Selects properties to return.

Search

String

Searches items by search phrases.

Filter

String

Filters items by property values.

Order By

Array of String

Orders items by property values.

Custom Query Parameters

Object

Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration.

#[null]

Custom Headers

Object

Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

### Output

Type

Array of Messages of String payload and HTTP Response Attributes

### For Configurations - [Config](#Config) ### Throws - DYNAMICS365-BC:BAD\_REQUEST - DYNAMICS365-BC:COMPANY\_NOT\_FOUND - DYNAMICS365-BC:CONNECTIVITY - DYNAMICS365-BC:DIALOG\_EXCEPTION - DYNAMICS365-BC:FILTER\_ERROR\_EXCEPTION - DYNAMICS365-BC:INVALID\_CREDENTIALS - DYNAMICS365-BC:INVALID\_OPTION\_ENUM\_VALUE - DYNAMICS365-BC:METHOD\_NOT\_ALLOWED - DYNAMICS365-BC:METHOD\_NOT\_IMPLEMENTED - DYNAMICS365-BC:NOT\_FOUND - DYNAMICS365-BC:RESOURCE\_NOT\_FOUND - DYNAMICS365-BC:SERVER\_ERROR - DYNAMICS365-BC:TIMEOUT - DYNAMICS365-BC:UNAUTHORIZED - DYNAMICS365-BC:UNKNOWN - DYNAMICS365-BC:VALIDATION ## Unauthorize `` Deletes all the access token information of a given resource owner ID so that it is impossible to execute any operation for that user without doing the authorization dance again. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Resource Owner Id

String

ID of the resource owner for whom to invalidate access.

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component.

x

### For Configurations - [Config](#Config) ## Update Entity `` Updates a single entity by its ID. You must provide the latest ETag value for the entity to update successfully. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Company ID

String

ID of the company.

Entity

String

Name of the operation entity.

x

Entity ID

String

ID of the entity.

x

ETag

String

x

Body

Binary

x

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Custom Query Parameters

Object

Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration.

#[null]

Custom Headers

Object

Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration.

Response Timeout

Number

How long Mule waits for a response to complete before the request times out.

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Response Timeout field.

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

How the connector streams request content to the remote service:

  • AUTO (default)

    Connector automatically uses the best streaming strategy based on the request content.

  • ALWAYS

    Connector always streams the request content.

  • NEVER

    Connector does not stream the request content.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

### Output

Type

Any

Attributes Type

### For Configurations - [Config](#Config) ### Throws - DYNAMICS365-BC:BAD\_REQUEST - DYNAMICS365-BC:COMPANY\_NOT\_FOUND - DYNAMICS365-BC:CONNECTIVITY - DYNAMICS365-BC:DIALOG\_EXCEPTION - DYNAMICS365-BC:ENTITY\_CHANGED - DYNAMICS365-BC:INVALID\_CREDENTIALS - DYNAMICS365-BC:INVALID\_OPTION\_ENUM\_VALUE - DYNAMICS365-BC:METHOD\_NOT\_ALLOWED - DYNAMICS365-BC:METHOD\_NOT\_IMPLEMENTED - DYNAMICS365-BC:NOT\_FOUND - DYNAMICS365-BC:RESOURCE\_NOT\_FOUND - DYNAMICS365-BC:RETRY\_EXHAUSTED - DYNAMICS365-BC:SERVER\_ERROR - DYNAMICS365-BC:STRING\_EXCEEDED\_LENGTH - DYNAMICS365-BC:TIMEOUT - DYNAMICS365-BC:UNAUTHORIZED - DYNAMICS365-BC:UNKNOWN - DYNAMICS365-BC:VALIDATION ## Sources ## On New or Updated Customer `` Initiates a flow when a customer is created or updated. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Company ID

String

ID of the company.

Since

String

Date in the yyyy-MM-dd’T’HH:mm:ss’Z' format, for example, 2014-01-01T00:00:00Z.

1970-01-01T00:00:00.000Z

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component.

x

Primary Node Only

Boolean

Determines whether to execute this source on only the primary node when running Mule instances in a cluster.

Scheduling Strategy

scheduling-strategy

Configures the scheduler that triggers the polling.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

Reconnection Strategy

Retry strategy in case of connectivity errors.

### Output

Type

Any

Attributes Type

### For Configurations - [Config](#Config) ## On New or Updated Item `` Initiates a flow when an item is created or updated. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Company ID

String

ID of the company.

Since

String

Date in the yyyy-MM-dd’T’HH:mm:ss’Z' format, for example, 2014-01-01T00:00:00Z. If this field is empty, this operation retrieves the selected objects from the time the Mule app is started.

1970-01-01T00:00:00.000Z

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component.

x

Primary Node Only

Boolean

Determines whether to execute this source on only the primary node when running Mule instances in a cluster.

Scheduling Strategy

scheduling-strategy

Configures the scheduler that triggers the polling.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

Reconnection Strategy

Retry strategy in case of connectivity errors.

### Output

Type

Any

Attributes Type

### For Configurations - [Config](#Config) ## On New or Updated Sales Order `` Initiates a flow when a sales order is created or updated. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Company ID

String

ID of the company.

Since

String

Date in the yyyy-MM-dd’T’HH:mm:ss’Z' format, for example, 2014-01-01T00:00:00Z. If this field is empty, this operation retrieves the selected objects from the time the Mule app is started.

1970-01-01T00:00:00.000Z

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component.

x

Primary Node Only

Boolean

Determines whether to execute this source on only the primary node when running Mule instances in a cluster.

Scheduling Strategy

scheduling-strategy

Configures the scheduler that triggers the polling.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

Reconnection Strategy

Retry strategy in case of connectivity errors.

### Output

Type

Any

Attributes Type

### For Configurations - [Config](#Config) ## Types ### Proxy Configures a proxy for outbound connections.
FieldTypeDescriptionDefault ValueRequired

Host

String

Host where the proxy requests is sent.

x

Port

Number

Port where the proxy requests is sent.

x

Username

String

Username used to authenticate against the proxy.

Password

String

Password used to authenticate against the proxy.

Non Proxy Hosts

String

List of comma-separated hosts against which the proxy must not be used.

### TLS Configures TLS to provide secure communications for the Mule app.
FieldTypeDescriptionDefault ValueRequired

Enabled Protocols

String

Comma-separated list of protocols enabled for this context.

Enabled Cipher Suites

String

Comma-separated list of cipher suites enabled for this context.

Trust Store

Configures the TLS truststore.

Key Store

Configures the TLS keystore.

Revocation Check

Configures a revocation checking mechanism.

### Truststore Configures the truststore for TLS.
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the truststore. Mule resolves the path relative to the current classpath and file system.

Password

String

Password used to protect the truststore.

Type

String

Type of truststore.

Algorithm

String

Encryption algorithm that the truststore uses.

Insecure

Boolean

If true, Mule stops performing certificate validations. Setting this to true can make connections vulnerable to attacks.

### Keystore Configures the keystore for the TLS protocol. The keystore you generate contains a private key and a public certificate.
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the keystore. Mule resolves the path relative to the current classpath and file system.

Type

String

Type of keystore.

Alias

String

Alias of the key to use when the keystore contains multiple private keys. By default, Mule uses the first key in the file.

Key Password

String

Password used to protect the private key.

Password

String

Password used to protect the keystore.

Algorithm

String

Encryption algorithm that the keystore uses.

### Standard Revocation Check Configures standard revocation checks for TLS certificates.
FieldTypeDescriptionDefault ValueRequired

Only End Entities

Boolean

Which elements to verify in the certificate chain:

  • true

    Verify only the last element in the certificate chain.

  • false

    Verify all elements in the certificate chain.

Prefer Crls

Boolean

How to check certificate validity:

  • true

    Check the Certification Revocation List (CRL) for certificate validity.

  • false

    Use the Online Certificate Status Protocol (OCSP) to check certificate validity.

No Fallback

Boolean

Whether to use the secondary method to check certificate validity:

  • true

    Use the method that wasn’t specified in the Prefer Crls field (the secondary method) to check certificate validity.

  • false

    Do not use the secondary method to check certificate validity.

Soft Fail

Boolean

What to do if the revocation server can’t be reached or is busy:

  • true

    Avoid verification failure.

  • false

    Allow the verification to fail.

### Custom OCSP Responder Configures a custom OCSP responder for certification revocation checks.
FieldTypeDescriptionDefault ValueRequired

Url

String

URL of the OCSP responder.

Cert Alias

String

Alias of the signing certificate for the OCSP response. If specified, the alias must be in the truststore.

### CRL File Specifies the location of the certification revocation list (CRL) file.
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the CRL file.

### Reconnection Configures a reconnection strategy for an operation.
FieldTypeDescriptionDefault ValueRequired

Fails Deployment

Boolean

What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy:

  • true

Allow the deployment to fail.

  • false

Ignore the results of the connectivity test.

Reconnection Strategy

Reconnection strategy to use.

### Reconnect Configures a standard reconnection strategy, which specifies how often to reconnect and how many reconnection attempts the connector source or operation can make.
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often to attempt to reconnect, in milliseconds.

Blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

Count

Number

How many reconnection attempts the Mule app can make.

### Reconnect Forever Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often to attempt to reconnect, in milliseconds.

Blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

### Expiration Policy Configures an expiration policy strategy.
FieldTypeDescriptionDefault ValueRequired

Max Idle Time

Number

Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Max Idle Time field.

### HTTP Response Attributes Configures HTTP response attributes for the configuration.
FieldTypeDescriptionDefault ValueRequired

Status Code

Number

HTTP status code of the response.

x

Headers

Object

Map of HTTP headers in the message.

x

Reason Phrase

String

HTTP reason phrase of the response.

x

### Repeatable In Memory Stream Configures the in-memory streaming strategy by which the request fails if the data exceeds the MAX buffer size. Always run performance tests to find the optimal buffer size for your specific use case.
FieldTypeDescriptionDefault ValueRequired

Initial Buffer Size

Number

Initial amount of memory to allocate to the data stream. If the streamed data exceeds this value, the buffer expands by Buffer Size Increment, with an upper limit of Max In Memory Size value.

Buffer Size Increment

Number

Amount by which the buffer size expands if it exceeds its initial size. Setting a value of 0 or lower specifies that the buffer can’t expand.

Max Buffer Size

Number

The maximum amount of memory to use. If more than that is used then a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower than or equal to zero means no limit.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit for the Initial Buffer Size, Buffer Size Increment, and Buffer Unit fields.

### Repeatable File Store Stream Configures the repeatable file-store streaming strategy by which Mule keeps a portion of the stream content in memory. If the stream content is larger than the configured buffer size, Mule backs up the buffer’s content to disk and then clears the memory.
FieldTypeDescriptionDefault ValueRequired

In Memory Size

Number

Maximum amount of memory that the stream can use for data. If the amount of memory exceeds this value, Mule buffers the content to disk. To optimize performance:

  • Configure a larger buffer size to avoid the number of times Mule needs to write the buffer on disk. This increases performance, but it also limits the number of concurrent requests your application can process, because it requires additional memory.

  • Configure a smaller buffer size to decrease memory load at the expense of response time.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit for the In Memory Size field.

### Redelivery Policy Configures the redelivery policy for executing requests that generate errors. You can add a redelivery policy to any source in a flow.
FieldTypeDescriptionDefault ValueRequired

Max Redelivery Count

Number

Maximum number of times that a redelivered request can be processed unsuccessfully before returning a REDELIVERY_EXHAUSTED error.

Message Digest Algorithm

String

Secure hashing algorithm to use if the Use Secure Hash field is true. If the payload of the message is a Java object, Mule ignores this value and returns the value that the payload’s hashCode() returned.

Message Identifier

One or more expressions that determine if a message was redelivered. This property can be set only if the Use Secure Hash field is false.

Object Store

ObjectStore

Configures the object store that stores the redelivery counter for each message.

### Redelivery Policy Message Identifier Configures how to identify a redelivered message and how to find out when the message was redelivered.
FieldTypeDescriptionDefault ValueRequired

Use Secure Hash

Boolean

If true, Mule uses a secure hash algorithm to identify a redelivered message.

Id Expression

String

One or more expressions that determine when a message was redelivered. You can set this property only if the Use Secure Hash field is false.

### Repeatable In Memory Iterable
FieldTypeDescriptionDefault ValueRequired

Initial Buffer Size

Number

Amount of instances that are initially allowed to be kept in memory to consume the stream and provide random access to it. If the stream contains more data than can fit into this buffer, then the buffer expands according to the Buffer Size Increment attribute, with an upper limit of Max In Memory Size. The default value is 100 instances.

Buffer Size Increment

Number

How much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer must not expand, meaning that a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer is full. The default value is 100 instances.

Max Buffer Size

Number

Maximum amount of memory to use. If more than that is used, then a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower than or equal to zero means no limit.

### Repeatable File Store Iterable
FieldTypeDescriptionDefault ValueRequired

In Memory Objects

Number

Maximum amount of instances to keep in memory. If more than that is required, content on the disk is buffered.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit for the In Memory Size field.

## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Microsoft Dynamics 365 Business Central Connector version: 1.0 is-latest-version: true --- # Microsoft Dynamics 365 Business Central Connector 1.0 XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio: - If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Studio XML editor or from a text editor, you can access the connector from your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. - If you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/microsoft-dynamics-365-business-central http://www.mulesoft.org/schema/mule/microsoft-dynamics-365-business-central/current/mule-microsoft-dynamics-365-business-central.xsd ``` This example shows how the namespace statements are placed in the XML block: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. When you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule4-microsoft-dynamics-365-business-central x.x.x mule-plugin ``` Replace `x.x.x` with the version that corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `microsoft dynamics 365 business central`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Microsoft Dynamics 365 Business Central Connector version: 1.0 is-latest-version: true --- # Using Anypoint Studio to Configure Microsoft Dynamics 365 Business Central 1.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure a source for the connector’s flow](#configure-input-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). 6. [Configure the other connector fields](#configure-other-fields). When you run the connector, you can view the app log to check for problems in real time, as described in [View the App Log](#view-app-log). If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, refer to the [Microsoft Dynamics 365 Business Central Connector Reference](https://docs.mulesoft.com/microsoft-dynamics-365-business-central-connector/latest/microsoft-dynamics-365-business-central-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure the connector: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add Anypoint Connector for Microsoft Dynamics 365 Business Central (Microsoft Dynamics 365 Business Central Connector) to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In the **Mule Palette** view, click **(X) Search in Exchange**. 2. In the **Add Dependencies to Project** window, type `microsoft dynamics 365 business central` in the search field. 3. Click **Microsoft Dynamics 365 Business Central Connector** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace. ## Configure a Source A source initiates a flow when a specified condition is met. You can configure one of these sources to use with Microsoft Dynamics 365 Business Central: - HTTP Listener Initiates a flow each time it receives a request on the configured host and port - Scheduler Initiates a flow when a time-based condition is met For example, to configure an HTTP Listener source, follow these steps: 1. In the **Mule Palette** view, select **HTTP > Listener**. 2. Drag **Listener** to the Studio canvas. 3. On the **Listener** configuration screen, optionally change the value of the **Display Name** field. 4. Specify a value for the **Path** field. 5. Click the plus sign (**+**) next to the **Connector configuration** field to configure a global element that can be used by all instances of the HTTP Listener source in the app. 6. On the **General** tab, specify the connection information for the connector. 7. On the **TLS** tab, optionally specify the TLS information for the connector. 8. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 9. Click **Test Connection** to confirm that Mule can connect with the specified server. 10. Click **OK**. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you are specifying an action for that connector to perform. To add an operation for Microsoft Dynamics 365 Business Central Connector, follow these steps: 1. In the **Mule Palette** view, select **Microsoft Dynamics 365 Business Central** and then select the desired operation. 2. Drag the operation onto the Studio canvas to the right of the source. ## Configure a Global Element for the Connector When you configure a connector, configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials that the connector requires to access the target Microsoft Dynamics 365 Business Central system. Microsoft Dynamics 365 Business Central Connector supports Basic Auth and OAuth2. To configure the global element for Microsoft Dynamics 365 Business Central Connector, follow these steps: 1. Select the operation in the Studio canvas. 2. In the configuration screen for the operation, click the plus sign (**+**) next to the **Connector configuration** field to access the global element configuration fields. 3. On the **General** tab, in **Connection**, select the authentication method to configure. - Select [Basic Auth](#basic-auth) to configure Basic Auth. - Select [OAuth2](#oauth2) to configure OAuth2. You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, refer to [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. ### Basic Auth Enter the following information on the **General** tab of the **Global Element Properties** screen to configure Basic Auth:
FieldUser Action

Name

Configuration name

Username

Username used to authenticate the requests

### OAuth2 Use OAuth 2.0 to delegate user authentication to the service hosting the user account. For more information, refer to [Configuring OAuth 2.0 for Connectors](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2), [Configuring OAuth 2.0 for Connectors on CloudHub](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2-cloudhub), or [OAuth Support in the SDK](https://docs.mulesoft.com/mule-sdk/latest/oauth). Enter the following information on the **General** tab of the **Global Element Properties** screen to configure OAuth2:
FieldUser Action

Name

Configuration name

Consumer Key

OAuth consumer key, as registered with the service provider

Consumer Secret

OAuth consumer secret, as registered with the service provider

Listener Config

Configuration for the HTTP listener that listens for requests on the access token callback endpoint

Callback Path

Path of the access token callback endpoint

Authorize Path

Path of the local HTTP endpoint that triggers the OAuth dance

## Configure Additional Connector Fields After you configure a global element for Microsoft Dynamics 365 Business Central Connector, configure the other required fields for the connector. The required fields vary depending on which connector operation you use. ## View the App Log To check for problems, you can view the app log as follows: - If you’re running the app from Anypoint Platform, the app log output is visible in the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log output is visible in your OS console. Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the app log in the default location `MULE_HOME/logs/.log`. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Microsoft Dynamics 365 Business Central Reference](https://docs.mulesoft.com/microsoft-dynamics-365-business-central-connector/latest/microsoft-dynamics-365-business-central-connector-reference) - [Salesforce Help](https://help.salesforce.com)