Microsoft Dynamics 365 Business Central Setup Guide Private Previewlink
Follow our setup guide to connect Microsoft Dynamics 365 Business Central to Fivetran.
Prerequisiteslink
To connect Microsoft Dynamics 365 Business Central to Fivetran, you need:
- a Microsoft Dynamics 365 Business Central account with Administrator privileges
- Visual Studio Code (VS Code)
NOTE: For more information about installing VS Code, see its documentation.
- a Business Central sandbox environment with a valid license to develop AL extensions
Setup instructionslink
Install AL Language extensionlink
Open VS Code.
On the navigation menu, click the Extensions icon and search for
AL Language extension for Microsoft Dynamics 365 Business Central
.In the search results, click Install for AL Language extension for Microsoft Dynamics 365 Business Central.
Once the installation is complete, restart VS Code.
Create AL packagelink
- In VS Code, open the command palette and select AL: Go! to create an AL package in your local machine.
TIP: You can open the command palette using the following keyboard shortcuts:
- Windows: ctrl + shift + p
- macOS: cmd + shift + p
- Specify the path to the folder where you want to create the package and press Enter.
- Select the latest AL runtime version.
NOTE:
- You must select a runtime version higher than v7.0.
- We recommend that you use AL runtime version 12.0 (Business Central 2023 release wave 2). With runtime 13.0 (Business Central 2024 release wave 1), you may encounter issues while installing your AL package on your Business Central environment.
- For more information about choosing runtime versions, see Business Central's documentation.
- Select Microsoft cloud sandbox for online account as your server.
Connect VS Code instance to sourcelink
On the navigation menu, click the Explorer icon and open the
launch.json
file.In the JSON content of the file, set the value of
enviornmentName
to the name of a sandbox environment name in your Business Central account.Save and close the
launch.json
file.Open the command palette and select AL: Download symbols.
In the pop-up window, click Copy & Open. VS Code will copy a code to your clipboard and will redirect you to Microsoft's login page.
On the Microsoft's login page, paste the code from your clipboard and click Next.
Log in to your Business Central Administrator account.
In all the confirmation windows, click Continue to connect your local VS Code instance to your Business Central account.
Go to VS Code. You will see a confirmation message indicating that the download of symbols was successful.
Specify ID range for API pageslink
On the navigation menu, click the Explorer icon and select the
app.json
file.In the JSON content of the file, change the values for the
idRanges
setting. Set the value offrom
to90000
and the value ofto
to90149
.NOTE: If the ID range from
90000
through90149
is already used by another package, specify a different range that is available for use.Save and close the
app.json
file.
Add API pageslink
Download the
InitialSetup.al
file from our GitHub repository to the AL package you created in Step 2. This file contains pre-defined API pages for the standard tables in Business Central. If you do not want to download the file, you can copy its contents into a new AL file (.al
file) and store it in your AL package.Verify whether the AL file contains API pages for all the tables you want to sync. If it doesn't, create new API pages for the missing tables. You can add the new pages to the same AL file or create a new AL file for them in your AL package.
IMPORTANT: You must expose the
systemId
andsystemModifiedAt
columns in every API page you create. Both column names are case-sensitive.Verify whether the
id
values for all the tables, API pages, and code units in your AL package are within theidRanges
values you specified in Step 4.Go to VS Code and save all the AL files in your AL package.
Generate permission setlink
- Open the command palette and select AL: Generate permission set as XML file containing current extension object. This will generate a
extensionsPermissionSet.xml
file in your AL package. - Open the
extensionsPermissionSet.xml
file and make a note of theRoleId
value. - Save all the files in the AL package.
Install AL packagelink
Install AL package on sandbox environmentlink
In VS Code, click Run without Debugging on the Run menu.
NOTE: You can track the logs in the DEBUG CONSOLE panel to identify the errors (if any). For more information about resolving the errors, see our troubleshooting documentation.
Once the package is installed, you will be redirected to your Business Central account.
Install AL package on production environmentlink
In VS Code, open the command palette and select AL: package. This generates a
.app
file in the AL package you created in Step 2.Go to your Business Central account.
Switch to any company in the production environment.
Go to the Extension Management page.
Go to the Manage tab and click Upload Extension.
In the Upload And Deploy Extension window, upload the newly generated
.app
file from your AL package.Set the acknowledgement toggle to ON.
Click Deploy.
NOTE: To see the deployment status, go to the Manage tab and click Installation Status. If the deployment fails, see our troubleshooting documentation or contact Business Central's support team.
Allow HTTP requests for AL packagelink
IMPORTANT: You must perform this step if you want us to capture deletes for your source tables.
In your Business Central account, go to the sandbox or production environment where you installed your AL package in Step 7.
Go to the Extension Management page and select your AL package.
Set the Allow HttpClient Requests toggle to ON.
Assign permission set to userlink
- Go to your Business Central account.
- In your Business Central account, switch to the environment where you installed the AL package.
- Search for users and select the user you want to use to authenticate Fivetran's Business Central connector.
- Select New Line.
- In the Permission set column, add the
RoleId
value you found in theextensionsPermissionSet.xml
file. - Select another New Line and add the D365 Read permission set.
- (Optional) If you want to sync the data of a subset of companies, create a New Line with the same permission set for each company whose data you want to sync.
NOTE : If you have added custom tables to your AL package, provide the necessary Read permissions to
table
,tableData
, andpage
types of the custom tables.
Find tenant IDlink
Find your tenant ID in your Business Central URL and make a note of it. For example, if your Business Central URL is https://businesscentral.dynamics.com/fivetran/
, then your tenant ID is fivetran
.
Find environment namelink
In the top right corner of your Business Central dashboard, click the Environment icon.
Make a note of your Business Central environment. You will need it to configure Fivetran.
Finish Fivetran configurationlink
- In the connector setup form, enter the Destination schema name of your choice.
- Enter the Tenant ID you found.
- Enter the Environment name you found.
- Click Authorize. You will be redirected to your Business Central account to authorize Fivetran's access.
- Click Accept to authorize Fivetran's access. You will be redirected back to Fivetran.
- Select the Companies whose data you'd like to sync.
- Click Save & Test. Fivetran will take it from here and sync your Business Central data.
Related articleslink
description Connector Overview
account_tree Schema Information
settings API Connector Configuration