Microsoft Dynamics 365 Business Central Integration Set Up Guide

Microsoft Dynamics 365 Business Central Integration Set Up Guide

Connecting to Microsoft Dynamics 365 Business Central

As Business Central and Lightyear are both cloud-based, set up and connectivity between the systems is seamless. Here's how!

Prerequisites

Adding a New App Registration

For this portion of the set up, you will need to log into the Microsoft Entra Admin Centre. 

Along the left hand side, go to Applications > App Registrations and click New Registration

On the Register an Application page, give your App a name, something like Lightyear to make it obvious what it is.

In the Supported Account Types section, select the first option for Accounts in this organisation directory only (Single tenant).

Within the Redirect URI area, select Web from the dropdown and in the field to the right, paste this: https://businesscentral.dynamics.com/OAuthLanding.htm

Once you have entered all these details, click Register.

On the Overview page, you will see a field for Application (Client) ID and Directory (Tenant) ID. Be sure to copy these as you'll need it in the [Dynamics] and [Connection] sections.

Generating a Client Secret

Within the App, head to the Certificates & Secrets section and click New Client Secret.

Within the modal that appear on the side, enter a Description and an Expiry Date from the dropdown - if you set this as a shorter date, your Lightyear connection to Business Central may disconnect earlier than you would like.

Once the secret has been created be sure to copy the Value that is generated here, you'll need to input it when you get to the [connection step link] 

Configuring Permissions

With the secret created, go to the API Permissions section and click Add a Permission.

You'll see a new modal appear with different Microsoft APIs to select - here you'll need to click Dynamics 365 Business Central.

Then select Application Permissions as the Request API Permission.

Once this has been selected, you'll see more options appear in the bottom half of your screen. From the short list of permissions, check the API.ReadWrite.All option under the API section and click Add Permissions once done.

Adding Application to Business Central

After the API Permissions have been added in Entra, you can head into Business Central to finish the set up. 

In the search in the top right, find Microsoft Entra Applications. On this page, click New.

Within the Client ID field, enter the Client ID previously generated in Entra. 

In Description, enter a relevant description to describe the Application e.g. Lightyear. 

After you enter these two details, you can move onto adding the Permissions.


Setting Permissions in Business Central

If it's available, click the New Line button, alternatively click the empty field under Permission Set and then the horizontal 3 dots. 

You'll see a list of permissions available to be added. You can either scroll through the list or use the Search at the top.


The permissions needing to be added are:
  1. D365 ACC. PAYABLE
  2. D365 DIM CHANGE GLO
  3. D365 FIN. & PURCH.
  4. D365 GL REVIEW
  5. D365 GLOBAL DIM MGT
  6. D365 PURCH DOC, EDIT
  7. D365 PURCH DOC, POST
  8. D365 VENDOR, EDIT
  9. D365 VENDOR, VIEW
  10. VAT GROUP MEMBER
  11. VAT GROUP REPRESENT.

Enabling and Granting Permission

Once you have added the 12 permissions, scroll back up to the State field and change the dropdown option to Enabled.

Then click the Grant Permission button at the top of the modal.

You'll be asked to Accept the requested permissions.

When successful, you will see a popup confirming the access was granted. After you see this, you can move to Lightyear to connect Lightyear to Business Central.

Establishing the Connection

Within Lightyear, on the Navigation Pane, head over to Settings > Accountancy > select Business Central > Connect.

You'll be asked to confirm your Accountancy Software Settings, you can do this now or after the connection is done. For more information on what each setting is, click [here]. Click Confirm & Connect.

This modal will close and another will open asking you for details generated within Entra and Business Central.

The Client ID and Tenant ID are found within Entra, in the Overview section of the Application previously created.

The Client Secret is the code previously copied in the [above] section. If you do not have this copied anymore, you will need to go back to Entra and create a new secret from the Certificated & Secrets section. 
Please Note: If you do this, you'll need to [Grant Consent] again within Business Central.
Once you have entered the 3 fields, click Connect.

The last step is to choose your Business Central Company from the dropdown menu. 

Lightyear will automatically sync the following data back from Business Central which are required to process your payables bills: 
  1. Dimensions
  2. Business Central Suppliers
  3. Chart of Accounts
  4. Tax Rates
The name of the Business Central company will be displayed once the connection is established to inform you which account is connected. The connection will remain active even when you log out and back into both systems and any user with Export permissions within Lightyear will be able to export bills to Business Central.  

Syncing of your Lightyear and Business Central account is now complete and you will be connected.
If you do nothing else in this section, please ensure you skip ahead to set up your [Tax Rates] before you move on. This will ensure documents uploaded to Lightyear will have the correct tax value against them.

Software Settings

Customise your Business Central settings by selecting Accountancy Software Settings.  In this section, you can:
  1. Turn on and select your Dimensions
  2. Automatically apply Dimensions on line item level
  3. Automatically apply Chart of Accounts on line item level
  4. Customise the field sent as the Posting Date 
  5. Enable Grouped Line Data

Do you use Dimensions?

If you use Dimensions within Business Central select Yes on this field. This will then display the What Dimensions do you use? option as explained below.

What Dimensions do you use?

Within Lightyear, you can currently only use 2 Dimensions at a time. If you have more set up within Business Central, you'll need to select the 2 to use within this dropdown box.

Click the dropdown and use the select boxes on the left to choose your Dimensions. Once you select 2, you will not be able to select anymore.

Automatically apply Dimensions on line item level?

  1. Yes - Save time by coding it in Lightyear, and we’ll remember the next time we extract the line item that you’ve coded the supplier lines to.
  2. No - Keep these blank for you to code individually.

Automatically apply Chart of Accounts on line item level?

  1. Yes - Save time by coding it in Lightyear, and we’ll remember the next time we extract the line item that you’ve coded the supplier lines to.
  2. No - Keep these blank for you to code individually.

Send Posting Date as

You can choose for the posting date to be exported as two different dates depending on your business needs.
  1. Export Date - the date the document has been exported from Lightyear into Business Central. 
  2. Invoice Date - the date populated in the Invoice Date field within Lightyear. If you select this option, you'll also have the option to select a Custom Date within this field in the Approvals Workflow.

Group Line Item Data?

Turning this on will allow you to export Grouped Account data, rather than line item data. For the full article on this, click here.

Business Central Suppliers

Business Central Suppliers are what Lightyear uses to connect a Supplier within Lightyear to a Supplier within Business Central. Any existing Suppliers in Business Central will appear here after connection.

When you connect to Business Central, by default, your list of existing Business Central Suppliers are synced to Lightyear.

Importing from Business Central

To import your Business Central Suppliers, go to Accountancy > Business Central Suppliers > Import Suppliers 

This import will include the following details, taken from your Business Central account:
  1. Supplier Name
  2. Country Code
  3. Currency
If you want to remove a Supplier, simply click the red trash can icon  on the right of each line. 

Creating New Business Central Suppliers

If you find you don't have a Supplier set up in your Business Central account and Lightyear, you can easily create this within Lightyear.

To do this, click the + Supplier selectedImg button in the top right of Business Central Suppliers. The following modal will display:

In the fields, enter the following information:

Supplier Name: the name of the Supplier. This will appear in Business Central as the Vendor Name.
Supplier ID: the number of the Supplier. This will appear in Business Central as the Vendor No. 
Currency: the currency you will be paying the Supplier in.
Country: the country related to where the Supplier is based.

Once this information is entered, click ConfirmThis Supplier will be created both in Lightyear and Business Central. 

If you make any changes or update the details of the Supplier within Business Central, you can update this in Lightyear by clicking the Import Suppliers selectedImg button.

Chart of Accounts

Account Codes are all imported to Lightyear when you link your Business Central account. These are displayed within the Account Code section of Accountancy. The Account Codes can be viewed in one long list or by filtering by Type, in the top left corner.

If you make any updates to your Accounts within Business Central, you can go to Accountancy > Chart of Accounts in Lightyear and click the Import from Business Central button, this will update and refresh your list.

If you wish to reduce the number of Account Codes that Lightyear presents to you in the dropdown lists, uncheck the tick boxes on the right of each Account Code. 

Lightyear requires a Rounding Account Code in order to Export to Business Central. When calculations from Lightyear differ from the calculations from Business Central, we will add in a Rounding Row to ensure the calculations match and are correct. If you don't have one, please add an Account Code to Business Central for the purpose of Rounding and ensure there no rules set against this e.g. no Dimensions/Tax Codes linked to it. 
selectedImg

Tax Rates

When you initially connect to Business Central, Lightyear will automatically import all your Business Central defined tax rates.

Setting Tax Rates (%)

Due to limitations on Business Central's side, Lightyear is unable to import the associated rate (%) with each Tax Rate, e.g. for a Standard 20% rate, this will import to Lightyear as 0% and you will need to manually adjust this to see the correct tax calculations within your Approvals Workflow.
When you click into Accountancy > Tax Rates, you'll see something similar to this view.

Your Tax Rates will be imported with 0% in the Rate column. To amend these, and ensure your documents apply the correct tax rate for calculations, click the green edit pencil  at the end of the line.

A modal will pop up with the details of the selected rate. In here you'll see the Tax Rate field with a 0% value populated by default.

In this field you can enter the value of the Tax Rate as displayed in Business Central, in this case it would be 20%. If you enter an incorrect value, you may see discrepancies when exporting documents from Lightyear to Business Central.

Once you have entered the value, don't forget to hit Confirm.

Repeat the process for any other tax rates that need adjusting.

Setting Default Tax and Tax Free Rates

You will need to choose two Business Central tax rates to act as the defaults for taxable and non-taxable items. Lightyear will use these defaults to send the relevant tax code to Business Central if a line is taxed/tax free, this is unless you choose to manually assign a different non-default tax rate to the item from within Lightyear's Bill Review section.  

To choose your 2 defaults go to Settings > Accounting Software > Tax Rates.

The below image shows what a typical setup looks like. We have ticked the 2 standard tax rates (Standard 20% and Exempt 0%).

Set a Default Tax Rate against a Supplier

Usually the Supplier Default Tax Rate is left blank, which allows the 2 defaults set above to work with maps.

But there may be circumstances where you assign a certain supplier with a different tax code to the defaults you have set at company level.

Go to the Suppliers > Select Supplier > Edit. You can then choose to set a default tax rate from the drop-down list.
selectedImg

Dimensions

Within Lightyear, you can select up to two Dimensions imported from Business Central.

To select your Dimensions, once connected go to Accountancy > Accountancy Software Settings. The Do you use Dimensions? option should be set to Yes.

When enabled, you'll see the additional option for What Dimensions do you use? with a dropdown menu. 

Select up to two Dimensions to enable within Lightyear. Once you select two, you will not be able to select any more.

Click Confirm once you are happy with your selection.

To see the Dimensions activated, click into Dimensions. In the top left you'll see a dropdown.

From the options, select the same two Dimensions you picked in the previous step. 
This will give you a full view of the Dimensions imported to Lightyear.



      

    Check out our
    to stay up to date

      • Related Articles

      • Error Messages Returned from Microsoft Dynamics Business Central upon Export

        Lightyear has a ton of built in validation checks to ensure the data is correct in Lightyear before trying to send the Bill and information to Business Central. However, there are occasions when the Export fails and Lightyear displays the reason for ...
      • Exporting from Lightyear to Microsoft Dynamics Business Central

        From the Signed Off tab in Lightyear, choose which bills to export by selecting or deselecting under the tick box column or individuals, then click the Export to Business Central button. Please Note: Up to 50 bills can be selected at one time to be ...
      • Microsoft Dynamics365

        Microsoft Dynamics365 Setup Lightyear allows you to export your bills in a pre-set CSV format, which can then be uploaded directly to MS_Dynamics via the Dynamics Configuration package. This CSV format should be compatible with Cloud versions of ...
      • Sage Business Cloud Integration Setup Guide

        Connecting to Sage Business Cloud As Sage Business Cloud and Lightyear are both cloud-based, set up and connectivity between the systems is seamless. Here's how! Please Note: Our Sage Business Cloud integration only works via the Northern Hemisphere ...
      • Xero Integration Setup Guide

        Connecting to Xero Because Xero and Lightyear are both cloud-based, set-up and connectivity between the two systems is seamless. Here's how. From the Navigation Pane, head over to Settings > Accounting Software > select Xero from the dropdown menu > ...