ADCS – Automated Data Capture System

Probably I felt about writing on ADCS (Automated Data Capture System) configuration in Microsoft Dynamics NAV 2013 R2, when I myself struggled a bit to gather all the relevant information to manage it properly. There are always some missing points in all documentation related to ADCS configuration and all of them are not collated together very well in any documentation.

So here is my guide to ADCS configuration Smile.

First of all let’s understand the architecture of ADCS in NAV 2013 R2; mind it – its no more MSMQ as communication mode between VT100 plugin and NAV server. Now the communication happens via web services –

image

[the above image is taken from msdn site]

I am not going into details of the architecture here. I assume you already understand it or will read about it on your own.

Now, what exactly you need to concentrate on to configure the ADCS? I divide it into 4 parts:

A. Installation of ADCS [Microsoft Dynamics NAV VT100 Plugin]

B. NAV configuration changes for ADCS

C. Logon permission to VT100 Service

D. ADCS config file.

Let me install ADCS afresh in my laptop and describe the steps to you:

A. Installation of ADCS:

I already have NAV 2013 R2 installed in my laptop and I am opening the add / remove programs and adding the ADCS component to the same by clicking on the ‘Change’

image

Once the NAV 2013 R2 maintenance window opens, select ‘Add or Remove Components’. This will open the list of components available to be installed –

image

Click on the ‘Automated Data Capture System’ and select ‘Run from my computer’. Click on the ‘Next’ button and that will open the ‘Specify parameters’ window –

image

if you have NAV 2013 R2 already installed, you don’t really need to change anything in this window. Review the properties and click on the ‘Apply’. This will start installing the ADCS component for Microsoft Dynamics NAV 2013 R2

image

This completes the installation of NAV ADCS component. Let me go to my next step –

B. Configuration changes in NAV for ADCS:

Once the installation is successfully done, let us come back to NAV RTC and check few things in which will enable ADCS to communicate with NAV server / database effectively –

B.1 ADCS User:

You need to create a ADCS user which will be used for authenticating the device’s access to the database. Go to ‘CRONUS India Ltd. / Departments / Administration / Application Setup / Warehouse / ADCS’ and open the ‘ADCS Users’

image

Create a new user and assign a password to it. The same user id and password you need to pass while connecting NAV from the handheld device.

B.2 Connect ADCS user with the Warehouse Employee:

Identify the ADCS user as one of the Warehouse employee [which in turn identify itself as one of the window’s login in NAV. for more details on the same, read about creating warehouse employees]. Go to  ‘<Company Name> / Departments / Warehouse / Setup / Warehouse’ and open ‘Warehouse Employees’ window –

image

Link between windows user [warehouse employee] and the ADCS user you have just created in previous step.

Now this user will have a default location [Default will be ticked next to the location code] which he can use in his warehouse related transactions in NAV. The same location must be ADCS enabled too. This step need to be repeated if the user has access to multiple location.

B.3 Enabling Location for ADCS use:

Open the location card [where the above defined user has access to work on] and tick ADCS checkbox in the warehouse fast tab.

image

B.4 Check the miniforms:

Go to ‘<Company Name> / Departments / Administration / Application Setup / Warehouse / ADCS’ and open the list of miniforms

image

These are the default miniforms available in ‘Cronus’ company and the same can be copied to any new company / installation you have created. These miniforms can manage all the standard warehouse functions / activities but you have the liberty to create additional miniforms to cater to additional custom activities [If you create any additional miniforms, the same may need changes in the associated ADCS related codeunits in NAV. These codeunits are between 7700 and 7714].

B.5 Publish the ADCS Web Service:

Publish the Web Service which will be called by the VT100 Component [Check the architecture at the top of the post] of NAV. Open the Web services window and add a new service with the object type ‘Codeunit’ and select 7714 in ‘Object Id’ –

image

Be sure the to keep the Service Name as ‘ADCS’. Check the service availability by copying the SOAP url and pasting it in your browser. This should display the details of the Web Service.

C. Logon permission to VT100 Service

Additionally the ADCS component of NAV [Microsoft Dynamics NAV VT100 plugin] must have the access to NAV database. This is determined by whether the logon user used for this plugin has the necessary permission in NAV database or not.

You can use an existing user id already used in NAV as logon user id for VT100 or you can create a dedicated windows user id for this use. The same user must have ‘ADCS ALL’ Permission Set. If you are not sure about the permission set you can go ahead with the ‘Super’ Permission Set assigned to the user.

For example, here I have used my user id as logon user for Microsoft Dynamics NAV VT100 plugin. [Services can be opened by typing in ‘services.msc’ in your Search / Run box]

image

Start the service of this plugin once you are done with logon information changes.

D. ADCS config file:

Lastly you need to check if the information mentioned in the ADCS config file are correct as per the NAV environment you are working on. Go to ‘C:Program Files (x86)Microsoft Dynamics NAV71Automated Data Capture System’ and edit the ‘Microsoft.Dynamics.Nav.VT100Plugin.exe.config’ file. [Note: VT100 plugin is a 32 bit application and i have 64 bit OS. That;’s why it under the folder ‘Program Files (x86)]

Majorly 3 attributes need to be checked here –

a. “NavWSEndpoint” url: Make sure this has the right url pointing to your ADCS web service. You can actually copy the SOAP url from the ADCS Web Service in Web Services window and paste it here.

b. Terminal listenIP: This denotes the IP address of the machine that is running the VT100 Plug-in service. 127.0.0.1 denotes the localhost. This you need to mention while logging to VT100 plugin from Handheld devices [This you can find in your Hosts files located in ‘C:WindowsSystem32driversetc’ folder]

c. Terminal listenPort: VT100 plugin uses port number 6666 by default.

image

Note: if you have changed any text in this file for your environment, please make sure that you have restarted ‘Microsoft Dynamics NAV VT100 Plugin’ service. 

Phew! Thankfully all the configuration is now over and I need to test the same. For this I will try simulating the ADCS functionality using a HyperTerminal client application  or Telnet. As windows 7 (my os) no longer have a HyperTerminal client included I will settle for Telnet,

[Note: you can enable Telnet in ‘add or remove programs > Turn windows feature on or off’ from control Panel if it is already not enabled / not visible]

So I have run the telnet and the telnet command prompts open up. Below mentioned command prompt is to connect to my VT100 service using port no 6666 in localhost-

‘o<space>localhost<space>6666’

image

Pressed enter and I got the ADCS login window displayed in my telnet command prompt –

image

Typed in my user id and pressed enter. Typed in my password and pressed enter.

[telnet can take 1 input at a time so you need to put your user id first and press enter and then you can put your password. And the text display may not look like that you have typed it right. but don’t worry, type user id and password correctly and it will work fine]

voila! We are done here. This opens up the list of functionality available to be used through ADCS and this list is nothing but the list of miniforms available in NAV –

image

That ends my session on configuring ADCS in Microsoft Dynamics NAV 2013 R2. From here you can go ahead and experiment on the default ADCS functions available in NAV.

If anything in any stage of this tour is not working fine in your environment, the best way to troubleshoot the same is to check the windows event viewer. it gives a hint / a clear picture what is wrong in your configuration. I am attaching a few scribbling I did on the whiteboard during one of my classroom training

9KTT5eCbUV0e8WW9Q92EK6T8

If you want further details on troubleshooting, you can refer to below msdn link –

ADCS Troubleshoot Guide

See you guys in my next post (probably a topic on interactive report designing in NAV 2013 R2. Keep Reading Smile

Have you migrated your Navision to SQL Server 2005 recently

Very recently Nisheel Poddar – IT head RKHS, migrated his Navision server from SQL Server 2000 to SQL Server 2005. Can you imagine what problem he has faced?
His users are unable to change their own password using Tools > Security > Password.
Checked with few more people who has migrated to SQL Server 2005 and surprised to find that everybody is having the same problem and they are solving the problem simply by assigning the dbowner role to their general users.
Dangerous. Don’t you think?
Nisheel Poddar was not satisfied and searched for solutions. What solutions we found you know?
In SQL Server 2000, we used to give the following roles to users while doing the user mapping to any Navision database:
1. Public (by default this is assigned to all users)
2. db_dataReader
3. db_datawriter
These 3 roles are enough for a generic user to use Navision functionality. Even this gives you the permission to change your own password using Tools > Password.
Here you mention your old password and assign a new password.

But when you migrate to SQL Server 2005, The same roles assigned to users does not allow them to change to their own password. When your users tries to change it, they will see the following error –

“The following SQL Server error(s) occurred:
15151,”42000”,[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot alter the login ‘nisheel’, because it does not exist or you do not have permission.

SQL:{CALL [sp_password](?, ?)}”

When you change your password from Navision client, the stored procedure ‘sp_password’ is called and the necessary permission to execute this stored procedure was included in ‘Public’ role of SQL Server 2000.

But the same permission is no longer associated with ‘Public’ role in SQL Server 2005. And that’s why you will have the problem in changing the password. And you are taking a dangerous decision of assigning ‘dbowner’ role to your users.

To resolve it without assigning the ‘dbowner’ role, you need to explicitly assign a specific permission to your ‘Public’ Role (the permission having execute power of Sp_password). Follow the instruction below

1. Follow the standard procedure of creating a new users and mapping them to a your Navision database. While User Mapping, assign the normal roles Public, db_datareader, db_datawriter.

2. Now, assign the permission ‘Alter any Login’ to your ‘Public’ role. Select the Server and open its property window.

Select ‘Permission’ page in left hand pane and select ‘Public’ role in the right hand pane. Scroll down and find the ‘Alter Any Login’ permission. Grant this permission to ‘Public’ Role.

Do remember, you need to be System Administrator to do the above setup.

Now try to see whether your users are able to change their own password or not. They will be able to do that.

This may not be the best possible solution and you are welcome to send your suggestion or any other solution to it.

Do send me your comments and suggestions.

Reblog this post [with Zemanta]

Do you know what Happens if you assign same no. series to both unposted as well as posted document?

Let us simulate the same scenario.
I have created a new no. series named ‘Test’ with a starting document no. ‘TEXT0001’ and assigned it to both ‘Unposted Sales Invoice’ as well as the ‘Posted Sales Invoice’ in sales & Receivables Setup window.
Afterwards, we have created 2 unposted sales invoices with the document no ‘TEST0001’ and ‘TEST0002’ (generated by the no. series Test).
The first sales invoice has the external document no ‘ABC’ and the second one has ‘ABC1’ as external document no.
Now what will happen if I post these documents? One of the comments in this discussion says that it will create a document no after the last no created by the no. series. So the first posted document will be ‘TEST0003’? What do you think? Let me post the invoices.
To make it more interesting, I have posted the second document (‘TEST0002’) first and the first document (‘TEST001’) second. Here is the screen shots of the posted documents. You can identify the documents with their respective external document no.

This is the first document posted second identified by the external document no ‘ABC’.
This is the second document posted first identified by the external document no ‘ABC1’.
You got the answers?
In this scenario, the posted documents are taking the same document no assigned in their unposted state. And as no new no is generated by the no. series, the posting process does not update the ‘Last no used’ field of the no. series line.
Have you tried this ever? Try it and I believe you will also find application of this functionality in real life implementation scenario also.
Best of luck

Do things differently

To start our discussion, let’s take a simple topic –

Few months back, in one of Orkut forum somebody had posted a problem as follows:

‘I have to pick out a digit from a code field. E.g. Code is ‘50123AD786′ n I have to select 7th character from this field How can this be done…’

You all know it’s simple and the common way to achieve this is:

Copystr([ur code variable],[position, say 7 for 7th position],[length, here for u its 1])

We have designed a new form here. Taken a new global variable called ‘Name’ of data type Text and inserted a text box to display the variable.

We also have written a single line code as per the above syntax to display the 7th character of the ‘Name’ in a message box.

Now, can we do it in not so common way?

Yes, we can if we know that a text string in Navision is nothing but an array of characters (literally). So here ‘Name’ variable is nothing but an array of its length and we can fetch out the 7th character of it by simply referring it as Name[7]. To validate it, let us change the code in the ‘OnPush’ trigger of the Button as below:

Message (FORMAT (Name [7]));

Why we needed a FORMAT command? Just because the message box can only display text not character.

Here I entered ‘Snehanshu Mandal’ in the text box and clicked on the button ‘Click me’. It’s displaying the 7th character of my name ‘s’.

Don’t you think it’s interesting?

How can we make working on Navision a FUN?

Hi friends! How are you doing?

Last month, I completed 6 ½ years working in Navision and was stumped by one of my junior’s question – Don’t you get bored while working with Navision after so many years? Big question.

People are getting bored very fast nowadays. But why? You get bored when –

1. Work is monotonous
2. Work can be monotonous when you know everything and there is nothing new left to learn
3. ‘Hey, I am doing the same form designing, report designing and data port designing’

Besides the above points, you will find plenty of reasons of why people are getting bored in Navision.

I think the answer lies in the approach you have towards Navision. Whether we are trying to solve a problem too technically or we are having a holistic approach to solve a problem? Again to have a holistic approach towards a problem, you need to be little experienced on Navision or you have a fair idea about Navision functional things. So the whole issue is little paradoxical.
Whatever may be the reason, here we are not to discuss the problem. Rather we are here to try & make working on Navision a little more enjoyable. And to make it enjoyable, the best thing is to do something new in Navision every day. Mind it, you can do something new only when you do not know everything but you know something of Navision to start with.

I am not here to teach you something new in Navision rather together we will search new things in Navision. Every day, we will discuss about one topic and if you feel interested, you are welcome to suggest me the future topic or contribute a new discussion. You are welcome to send the problem you are having in your implementation and together we will try to evolve most reasonable solution of it. When so many brains will work on the problem, definitely we will be able to achieve most suitable solution for the problem
So let’s wish ourselves happy learning of Navision.