Assisted Setup, Business Central, Dataverse, Dynamics 365 Connection Setup, Dynamics 365 Sales, Integration, Solutions, Tip & Tricks

Setup a connection to Dynamics 365 Sales

Integration with Business Central is done through Dataverse, and you will find lots of standard settings and tables that are provided by the integration.

This is the Third post in the series. If you want to go to previous post click here.

From the series of steps this post is dedicated to Step-2:

Before you start make sure you have below information ready with you:

  • URL for the Dataverse environment (Dynamics 365 Sales) that you want to connect to
  • The user’s name and password of an account that has administrator permissions in Business Central and Dataverse.
  • The local currency for the company in Business Central must be the same as the base transaction currency in Dataverse. 


As a second Step we will setup a Connection to Dynamics 365 Sales.

From Assisted Setup under Connect with other systems group choose Set up a connection to Dynamics 365 Sales, as shown below.

This Step is straight forward, you need to just respond to Next to each page of the Wizard.

The URL will be same as used in previous step, while Connecting to Dataverse. Click Next.

Optionally, there are advanced settings that can enhance security and enable additional capabilities, such as sales order processing and viewing inventory levels. The following table describes the advanced settings.

Click Finish to complete the Setup.

Next open the Dynamics 365 Connection Setup from TellMe.

Select Connection -> Test Connection

If everything is ok it should show Connection test Successful message.

Go to Dataverse Connection Setup, from Integration -> Integration Solutions

It will list you the solutions deployed.

Same you can find in Dynamics 365 Sales -> Settings -> Solutions

For more details you can have a look to Microsoft docs

Integrating with Dynamics 365 Sales

Now you are good to proceed with Next Step.

You can jump to Next Step from here.

Advertisement
Business Central, CDS, Common Data Services, Dataverse, Dynamics 365 Sales, Integration, Ownership, Permissions, Synchronize, Tip & Tricks, URL

Setup a connection to Dataverse

Integration with Business Central is done through Dataverse, and you will find lots of standard settings and tables that are provided by the integration.

This is the Second post in the series. If you want to go to previous post click here.

From the series of steps this post is dedicated to Step-1:

Create connection to integrate and synchronize data with another Dynamics 365 business app, such as Dynamics 365 Sales.

As a first Step we will setup a connection to Dataverse.

Before you start make sure you have below information ready with you:

  • URL for the Dataverse environment that you want to connect to
  • The user’s name and password of an account that has administrator permissions in Business Central and Dataverse.
  • The local currency for the company in Business Central must be the same as the base transaction currency in Dataverse. 

From Assisted Setup under Connect with other systems group choose Set up a connection to Dataverse, as shown below.

This will start the Setup wizard, just follow and provide your information asked on each page.

Click Next to Start configuring Dataverse & Business Central connection.

Here you can select your Dataverse Environment or can enter manually, above screen shows where you can find this url from.

Sign in with an administrator user account and give consent to the application that will be used to connect to Dataverse.


Choose Sign in with administrator user.

After Sign in with administrator user turns green and bold, choose Next.

Select Ownership and Click Next.

Click on Finish to complete the Setup.

Next open the Dataverse Connection Setup from TellMe.

Select from Connection -> Test Connection

You can check Microsoft docs for more information

Connect to Microsoft Dataverse

If all are OK it should show the Connection test Successful message.

Now you are good to proceed with Next Step.

You can jump to Next Step from here.

AL Table Proxy Generator Tool, Assisted Setup, Business Central, CDS, Common Data Services, Coupling, Custom Tables, Dataverse, Deploy, Dynamics 365 Sales, Integration, Mappings, Package, Permissions, Power Apps, Scheduling, Synchronize, Testing

Integration in Business Central with Dataverse/ Common Data Services/ Dynamics 365 Sales/ Power Apps

In this post I will discuss about how we can Synchronize data to Custom Tables using Dataverse.

This post is divided in series of small posts, one post for each involved step.

You follow each post link in sequence and at end we will achieve the final Goal set in starting of this post. 

This post will walkthrough setting up an integration between a Custom table Prospects in Business Central and a Custom table Prospects in Microsoft Dataverse.

One thing important keep in mind while doing all the steps we need to use the Admin login you used to setup these environments.

Also, the Base Currency of Business Central & Dataverse Environment should be same else you will run into issue.

If the currencies of Business Central and Dataverse do not match, similar message will be displayed.

LCY Code XXX does not match ISO Currency Code XXX of the Dataverse base currency.

The Base Currency defined for Dataverse after setup is not possible to change however you can match it in Business Central by changing LCY Code in General Ledger Setup.

Let’s start with introduction to environment we are going to use, throughout the process and steps described below.

Introduction to Environment:

Before we start with the Steps Involved, let me introduce with the environment which I am going to use in this walkthrough. 

Business Central Environment:

Dynamics 365 Sale Environment:

Setup required to Connect with external system:

You can find below options in Business Central Assisted Setup.

The following are the Steps we will follow:

Follow each step above in same sequence.

For more detailed insight refer to below Microsoft Documents:

Customizing an Integration with Microsoft Dataverse

AL Table Proxy Generator

Scheduling a Synchronization between Business Central and Dataverse

Hope you enjoyed the learning by example. Wait for next post, will be back soon.

See you in next post soon with similar kind of stuffs.

Till then keep Exploring, learning and sharing with others.

AL, Assisted Setup, Business Central, Development Tips, Extension Package, How To, Information, Tip & Tricks, V2, Visual Studio Code

Creating Assisted Setup in AL for Business Central

Today we will see how we can add our Wizard Page to Assisted Setup.

Continuing from previous post this is the second part as both are inter related.

If you have not gone through earlier post see here how to create Wizard Page for Business Central. Creating a Wizard Page in AL for Business Central

Let’s have some overview why we need assisted setup:

What is Assisted Setup?

  • List of setup scenarios, presented in list form.
  • Uses Wizard Page with relevant options.
  • Display Status of activity, completed or incomplete.
  • Predefined set of setup scenarios. Like E-Mail Setup, Cash Flow Forecast, Approval Workflows, Connection to other entities like CRM connection etc.
  • Possible to add new custom setup scenarios.

AS-1

Today we will see how we can add our Wizard Page for Company Information Setup into this List, and how the Status is updated in this list.

So further not going into theory let’s jump to practical Approach.

To add a New Assisted Setup:

  • 2 tables are involved Assisted Setup & Aggregated Assisted Setup.
  • Need to Subscribe to Event OnRegisteredAssistedSetup and call AddExtensionAssistedSetup.
  • Wizard should update the status in the Assisted Setup table.
  • Subscribe to Event OnUpdateAssistedSetupStatus to store the updated status.
  • Alternatively can determine actual status based on data.

Steps:

Create New Codeunit on available ID and unique name.

Code will be similar to below:

AS-2

Save the file and publish your Extension.

Now you should be able to locate your Wizard as entry ‘Setup Company Information’

AS-3

Click to Run your Company Information Setup Wizard.

AS-4

Complete your Setup by entering information and Click Finish.

AS-5

If you have completed all the step and provided information, your Status should show Completed.

You may need to re-open the Assisted Setup page.

It was just to give you an idea how we can get this done.

You will require to perform other some more steps to get it functioning smooth.

Sometime later will come up with more details.

Explore the existing Setups and can get more insight on the same.

I have given you the start explore learn and reach to conclusion.

See you again with some other topic in my upcoming post. Till then keep exploring and keep learning.

AL, Assisted Setup, Business Central, Development Tips, Extension Package, How To, Information, Modern Development Tool, Tip & Tricks, V2, Wizard

Creating a Wizard Page in AL for Business Central

In today’s post we will learn to create Wizards.

First Let us understand why we use wizards.

  • We can define wizard as series of user input screens or steps.
  • You can show/hide options for each step based on previous step selection that is relevant to complete any setup process.
  • User can navigate between steps with Next and Previous buttons.
  • In Web Client it shows buttons with specific styling.
  • We define Page with type NavigatePage.
  • Plays crucial part in Assisted Setup.

Without going into much theory let’s start creating a Wizard Page.

Step: 1 –

Create a New Page of type NavigatePage.

CI-1

Create *.al file in your VSCode Project, you can use tpage snippet.

Set the Unique available ID in your database and Extension.

Give meaningful name to your file.

Set the PageType property to NavigatePage.

Set SourceTable property to the base table in my case “Company Information”

Step: 2 –

Add a Group for each Step you wish for your Setup, in my case I am using 3 Step.

Create Global variable CurrentStep of type Integer, this will help making decision on which step you are currently and act accordingly.

CI-2

On each Group, Set the Visible property with an expression:

Visible – CurrentStep = 1;

And so on.

Step: 3 –

Create a sub-group inside the steps and set the suitable Caption.

Set InstructionalText to provide guidance

Add fields to the sub-group

CI-3

And similarly to other groups.

Step: 4 –

Add three actions to facilitate navigation.

For each action, set the InFooterBar property to true.

When this is used in combination of PageType NavigatePage, it will show action as navigation buttons.

CI-4

Step: 5 –

Create 3 global variables as Boolean, say ActionBackAllowed, ActionNextAllowed, ActionFinishAllowed

On each action, set the Enabled property to the appropriate global variable.

Set the Image property of your actions:

Back : PreviousRecord

Next : NextRecord

Finish : Approve

CI-5

Step: 6 –

Create function/procedure to SetControls, TakeStep and Set starting values in the OnOpenPage trigger.

CI-6

Step: 7 –

Now we will add OnAction trigger to the navigation actions.

CI-7

Step: 8 –

Now we will create 2 global record variables for Media Repository table and for the Media Resources table.

CI-8

Step: 9 –

Now add 2 new groups above Step 1 Group.

Add field to each group.

Set source expression to the Image field of the Media Resources variables.

Set ShowCaption property to false.

CI-9

You see error for TopBannerVisible let’s define a global variable of type Boolean.

Step: 10 –

Now we will Add a function to Load the top banner images.

Call this function from OnInit trigger.

CI-10

We are done with our base design of Wizard.

Now time to deploy and Test.

For testing purpose let’s hook it to some page and see the result.

Although it is not correct place but for testing purpose let’s add to our existing page created in earlier post “Loadout List” page and test the output.

CI-11

Added new action on “Loadout List” Page, just to check the output. I will come up with Assisted Setup in our next post and hook it there.

Now we will Build and Deploy the Extension and review what we created.

CI-12

Access your Loadout Point List Page from Sales Order Line and Run the Wizard.

Let’s run the same from the Web Client.

ci-13

ci-14

I will come up with linking this Wizard Page to Assisted Setup in our next post.