Access protected file share

There was a post, where a user wanted to get read/write acces to a file share outside the current domain from within Nav.

This can be done via .Net:

NetworkCredential := NetworkCredential.NetworkCredential(username, password, domain); // Credentials for domain 2
CredentialCache := CredentialCache.CredentialCache;
Uri := Uri.Uri(‘\\server’); // the server name from domain 2
CredentialCache.Add(Uri, ‘Basic’, NetworkCredential);
Dirs := SysDir.GetDirectories(‘\\server\directory’); // get folder list from the file share
FOR i:=1 TO Dirs.GetLength(0) DO
DirListTxt := DirListTxt + FORMAT(Dirs.GetValue(i-1))+’\’; //.net index starts with 0
MESSAGE(DirListTxt); // print out the dir list

NetworkCredential DotNet System.Net.NetworkCredential.’System
CredentialCache DotNet System.Net.CredentialCache.’System
Uri DotNet System.Uri.’System
Dirs DotNet System.Array.’mscorlib
SysDir DotNet System.IO.Directory.’mscorlib
DirListTxt Text
i Integer


Check License state of Objects

In Nav forums it’s quite often asked, how to check, if a object is within the current loaded license. There are some solutions for Nav 2009. I did not find a satisfying solution for newer Nav versions. So i’ve developed a “License Permission” Page, which lists Objects and their Permissions. Object IDs, which are not in the current loaded license, means there is no read or execute permission for that Object ID, are displayed red. When running the page the list of all nav objects in the database is loaded.

The buttons in the page:

Reload Base Objects: List all current database Object IDs
Swap Read Filter: Switch between 3 Read Permission Filter settings ” “, Yes|Inherited, No Filter
Swap Execute Filter: same as button above for Execute Permission
Custom Objects Filter: List objects between Object ID 50.000 and 99.999.

The object range buttons:

View Table Range: List all table Object IDs according the filter you set.
View Page Range: List all page Object IDs according the filter you set.
View Report Range: List all report Object IDs according the filter you set.
View CU Range: List all codeunit Object IDs according the filter you set.

You can download the page source code here.

The license information is saved in table “License Permission”. With a page on base of that table the windows client freezes, because the data load is really huge, especially, when filtering. So i developed that kind of solution.


How to vote on Microsoft.Connect

Weeks ago i’ve voted for a new dynamics nav feature. It was not easy  to do that. Other people had also problems with that. So for those, who also like to suggest new features or ask for hotfixes, there is a guide:

  • Goto
  • Sign in with your Live account or create one: Top right corner, drop down list, select `Microsoft Account`. To sign in you need special product permissions. If you get a “Access denied” message, you have to less permissions. Then please contact your nav partner or microsoft support.
  • After logging in, search through the product directory for Dynamics NAV and join the NAV Group. That’s needed for further options.
  • Select then Microsoft Dynamics from the drop down in the top right.
  • There you click “Search existing” and search for “Notifications”, then select the bug/feature from the list.
  • Now you can vote . If you want, you can write a feedback e.g. “That’s an annoying bug, the customers call me every day, …”.

Error: You do not have the following permissions on CodeUnit ApplicationManagement: Execute

If you get following error:

then your nav user account has to less rights to work with the RTC client. This kind of error is normally shown, when you start the RTC client.

Reasons for that error can be:

  • You work with a database which comes from outside of your windows domain
  • Your permission set was changed

To solve that issue best you open SSMS (Sql Server Management Studio) and view table “User”. Search for your windows/nav account in field “User Name”. To go further you need the value in field “User Security ID”. Remember that value.

Then edit table “Access Control” and look for the same value in field “User Security ID”.

Change the “Role ID” value to SUPER, click the ENTER key to assign the change.

After that restart the RTC client and change your user settings as needed.