Sunday, November 4, 2018

ADCS NAV 2016 OVERVIEW

ADCS NAV 2016 OVERVIEW

Hi All,
     Today I'm going to describe how you can do ADCS Installation & Configuration in NAV 2016, also Testing using Hyper terminal.

Overview
       The Automated Data Capture System (ADCS) solution provides a way for Microsoft Dynamics NAV to communicate with handheld devices through web services. You can test your solution by using the VT100 plug-in.

Overview and Architecture
      ADCS enables you to accurately capture data for inbound, outbound, and internal documents, primarily for warehouse activities. For example, you can have users scan the bar codes of items in your warehouse as they perform daily tasks, and that information is recorded from these handheld device activities in Microsoft Dynamics NAV.




MSDYN365BC - Setup Business Central





Hi All,
In the last article, we installed dockers & Visual Studio Code for windows.

Next step is to download the Business Central Image using dockers and in future articles, 
we will start hacking or customizing Business Central.




Search and open Windows Powershell ISE as administrator.




Run command docker version to confirm that docker is installed and running.
If it's installed and running you will see an output as in below screenshot. If not then run the docker from the desktop shortcut or from the start menu.



Run command docker pull microsoft/bcsandbox:us to download the image for Business Central US version.

** This command running for the first time will take some time to download, don’t run it on a weak internet connection. 




Using an object-oriented programming analogy, the difference between a Docker image and a Docker container is the same as that of the difference between a class and an object. An object is the runtime instance of a class. Similarly, a container is the runtime instance of an image.

Run PowerShell command –
Set-ExecutionPolicy RemoteSigned

We will be running the script and by default, PowerShell stops running scripts. Run above command to set Execution Policy to Remote Signed.


install-module navcontainerhelper -force

navcontainerhelper is a PowerShell Module, which can be installed from the PowerShell Gallery by using above cmdlet.

docker images

Above command will list down all the images that you have downloaded till now. If you have already run download image in the last section you should see one image as shown below.



 docker container ls

Above command will list down all the containers which are running right now. As we don’t have any containers it will return blank.

New-NavContainer

For above command, please run using right-hand command panel and specify following parameters as per requirement. 



A Sample command for New-NAVContainer is below –
               
New-NavContainer -containerName sbineshMSDDYNBC -accept_eula -alwaysPull -assignPremiumPlan -auth NavUserPassword -doNotExportObjectsToText -enableSymbolLoading -imageName microsoft/bcsandbox:us -includeCSide -memoryLimit 3G -shortcutsDesktop –updateHosts

Once you run above command, the system will prompt you to save your username & Password as encrypted.





** Remember your password.
** Password should fulfill password policy for SQL Server.

Once the PowerShell command is complete, a screen like below as result of PowerShell cmdlet.




Please keep a note of from above screen –
** These values will be used for using this container.
1      Container IP Address
2        Container Hostname
3        Container Dns Name
4        Web Client
5        Dev. Server
6        Dev. ServerInstance
7        Files

Check your desktop, you should have all shortcut icons that are require accessing Business Central Container.




Go ahead and use any of these + if you have SQL Server management studio installed, you can connect to SQL for Docker database.

** Remember as docker will start all containers will start automatically. Please remember to use docker container stop cmdlet to save the memory of your host machine.

If you are interested to load some old NAV version using docker you can refer following GitHub page.

Business Central (Github)  https://hub.docker.com/r/microsoft/bcsandbox/

Be ready, with the setup of business central on your local system. We will be discussing AL Code and how we can customize Business Central.

Let me know if any questions. I will be happy to answer.







MSDYN365BC - Install Dockers

MSDYN365BC - Install Dockers.


This post is copied from @Saurav Dhayani, so Plz say thanks to Saurav for his great effort.

Hi All, 

The first article in this series is about the installation of dockers for windows. I know there may be some questions about dockers and why a new technology or software with all these changes in Product.

I will try to answer most of these questions and we will also talk about installation of Dockers. 

What is Dockers? 
     Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications, whether on laptops, data center VMs, or the cloud. 
Read More about dockers here.

Is Docker is a Microsoft Product? 
    Docker is not a Microsoft product. It's an open source software. In October 2014, Microsoft announced the integration of the Docker engine into the next Windows Server release. Windows Containers was made available for Windows 10 and Windows Server 2016. 

Why we need to install Docker?
    Freely from Microsoft has put great efforts in integrating NAV and MSDYN365BC with Dockers. 

With respect to NAV, dockers can be used for the following version - 
1. NAV 2016. 
2. NAV 2017. 
3. NAV 2018. 
All cumulative updates released by Microsoft on following versions are also available on dockers. 

Business Central (latest and greatest) releases is also available in dockers. 

More Resources by Freely - https://blogs.msdn.microsoft.com/freddyk/tag/nav-on-docker/ 

you can plan to use or not to use dockers but I personally feel it will be a cool tool in your toolbox to have multiple version and CU in one single environment which can be accessed turn on and off based on your requirements. I will be using dockers to configure and demo Business central. 

Docker Installation - 

Navigate to https://store.docker.com/editions/community/docker-ce-desktop-windows

Download the installer from the website. 




Double-click Docker for Windows Installer to run the installer. 

In the configuration panel, please select “Use Windows containers instead of Linux containers.”




Installation completed confirmation message. 





When the installation finishes, run docker from the desktop (if you selected Add shortcut to desktop). 

The whale icon in the notification area indicates that Docker is running, and accessible from a terminal. 





Be Ready with Dockers, we will be using in future articles. We have one more installation to be done to continue our journey towards Microsoft Dynamics 365 Business central. 
We will talk about it in future articles. 


Keep hacking. Questions? Please feel free to ask. 








Friday, November 2, 2018

SFTP Management using WinSCP

👋 Hi all,
SFTP Management using WinSCP
Recently I have worked on a Website Integration where the requirement was to upload, download, Remove, & Move the files over SFTP and then send the Information to Website Team through  REST/JSON API.

To achieve this goals I have created two modules.

1. Extract the Documents from NAV and then Upload, Download, Move & Remove over SFTP.
This module can be performed by SFTP Management Codeunit using WinSCP tools.

2. Send the information to Website so that they can manage (CRUD Operation) their database.
This module can be performed by Website Integration Mgt. Codeunit (Coming Soon).

WinSCP
WinSCP is an open source free SFTP client, FTP client, WebDAV client, S3 client and SCP client for Windows. Its main function is file transfer between a local and a remote computer. Beyond this, WinSCP offers scripting and basic file manager functionality.

Module 1:
Extract the Documents from NAV and then Upload, Download, Move & Remove over SFTP. This module can be performed by SFTP Management Codeunit using WinSCP tools.
Assume in NAV we have below objects




For better understanding please see the below Table structures:

Table 50065 Document Setup


Table 50066 Document Category



Table 50067 Documents


Plan:
1. First of all I would like to extract the documents from NAV, To achieve this I have written a procedure namely [TryFunction] ExportDocument(DocNoP : Code[20])

2. Now Upload the Extracted document into SFTP.
To achieve this I have written a procedure namely
 [TryFunction] UploadFile(SourceFileP : Text)

3. To maintain history and sending data to website I have done some more work Like:

a. I have setup, if document is Create / Update / Delete in NAV then create a record in Send Items to Website Table with
SendItemstoWebsite."Process Status"::Pending
And once the document is uploaded in SFTP then SendItemstoWebsite."Process Status"::” “ should blank.

b. Now the second module is going to execute for sending the data to website using REST / JSON API.

4. To perform this you have to install WinSCP in server and copy the WinSCPnet.dll file  from installed directory (C:\Program Files (x86)\WinSCP) and paste into NAV Service Add-Ins folder like: C:\Program Files\Microsoft Dynamics NAV\90\Service\Add-ins

Development:
Create a codeunit and declare the global variables as shown in below screenshot.



Create functions as shown as below screenshots



























Please let me know if you have any queries.....




Popular Posts