Microsoft Dynamics D365 Business Central Configuration with "Visual studio Code"
Prerequisite :
  • Install Microsoft Dynamics D365 Business Central [On Premise]
  • Install Visual Studio Code for “Al Language”.
  • Make Change in “Business Central Administration” [Developer]
  • Install “Al Language” extension in Visual Studio Code Editor for MSFT D365 BC.
  • Configure the File “Microsoft.Dynamics.Nav.Server.exe.config” for Publish Al Program. 
Setp1:

Install BC OnPrem. You can download that from PartnerSource or CustomerSource.

Click MSFT D365 BC [Microsoft Dynamics D365 Business Central] Setup file and choose the Option of “Run as administrator”. 

Click “Next” on the welcome screen and accept the License.

A New screen will appear next. Now select the Option that you want to use for Business Central, as shown below. Local installation select Advanced Installation Options.

In Next Screen, I will choose - Choose an installation Option instead of Installing Demo and I would like to choose components that get installed on my system.

As I am the developer I will choose, and select Customize as shown below.

I would like to install the following component. You can choose as per your requirements




In the next window, Specify port number or you can use as it is.
After setting up all parameters, click apply which will start the installation process.

After installation is completed, the system will prompt a confirmation message as below.

Step2:

Install “Visual Studio Code” Editor. So that goes to the Site https://code.visualstudio.com/download.
Here you can download “Visual Studio Code” Editor as per your Operating System.
So I used Windows OS then I choose windows “Visual Studio Code” Editor for download. After download file click on the setup file then followed by "Next" instruction.



Step3:

Go start or Press “Win” Button and Type “Business Central Administration”



Set the below “Development” Option as it. After setting the Option Restart the Service.



Step4:

Open “Visual Studio Code” Editor and Install ‘Al Language’. You can download this language by “Visual studio code” extension. [ but you are better off using the VSIX file that gets installed with BC OnPrem so that you are guaranteed that the extension version matches your exact build version of BC ]OR You can download this language by MSFT D365 Setup. I Choose MSFT D365 Setup file as shown in Image Below.



After click on “Install from VSIX “Option it Open Window to choose AL Language Option to Install as below.
In Case If Not Appear Window then Followed by path.

C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\130\AL Development Environment



Step5:

Change The value of “Microsoft.Dynamics.Nav.Server.exe.config”. [It is required when you want to Publish the Program code] 

path:C:\Program Files\Microsoft Dynamics 365 Business Central\130\Service\Microsoft.Dynamics.Nav.Server.exe.config

Change the Value “NetFx40_LegacySecurityPolicy” is “false”.



Step6:

Create a Project For “Hello Word”. In “visual Studio Code” Editor.

For a Create Project. Press Ctrl + Ship + P and Then Select Go.
Give the Project Name. And Press Enter.



It Creates Project and Configures the “launch.json” Fields. As Follows.
Authentication must be any one of the following credential Type. Windows, UserName, NavUserPassword, AccessControlService . [ I used Windows User for Login D365BC]



Here below the Program Code. There are two steps required to Run the Program First is download Symbol [This fetches all the existing objects, functions, and variables that are already defined in your BC database] and Publish.



Download Symbol Press “Ctrl +Shift + P” in “Visual Studio Code “Editor. Select the Option “Download Symbol”



Then publish the .app file. For Press “Ctrl +Shift + P” in “Visual Studio Code “Editor. Select the Option “Publish”. 



You Can see the Publish Files on 'Extension Management' of "Business central web client".

















Comments

Post a Comment

Popular posts from this blog

Microsoft Dynamics Mobile App Integration with NAV 2016

How to download Image or any file from Base64 in Dynamics 365 Business Central.