Three key factors of a successful Microsoft Dynamics NAV project

Great article about successful Nav projects, by Hannes Holst.

https://msdynamicsworld.com/story/three-key-factors-successful-microsoft-dynamics-nav-project

cheers

 

Advertisements

D365BC – Data Backups – Part 2

Rapid Start cannot be found with the search function, also the Rapid Start Profile is missing. But the according pages are there:

  • Config Templates
  • Config Worksheet
  • Config Packages

Unbenannt.JPG-750x597

The Config packages: There is a at least one demo config package containing most master data tables.

Unbenannt2.JPG-750x499

Screenshot at 2018-08-05 14-08-21

So there is a standard way for backing up and restore data with D365BC.

cheers

 

Dynamics 365 Business Central October ’18 release

Great news!

  • Cloud and On-Premise: means D365bc can be installed on a local server, you can make then backups of the database.
  • Extended VS-AL experience: support for .Net interop @ on-premise
  • Optimized user interface
  • Flow Filters, Limit Totals
  • Permission sets editable
  • Tenant admin
  • a.m.m.

details: https://docs.microsoft.com/en-us/business-applications-release-notes/October18/dynamics365-business-central/

cheers

 

D365BC – Data Backups

Currently D365BC is missing a couple of things, the licenses could be cheaper. But it’s the successor of Dynamics Nav. Now, some time after the release (name was changed quite often, feature list was changed very often, extension base tech was changed, a.s.o.) i decided to find at least one method for backing up data, a very missed feature. Maybe Microsoft will add that kind of feature in the future, nobody knows. But … in the meantime checkout this.

First i checked out the feature list of current D365BC, what can be used for that functionality or is an extension needed? So in the end i found the “Data Exports” in the finance module, a quite well known feature in NAV, which can be used for exporting data to text files. I worked with D365BC – Austria. Currently i don’t know what in detail are the differences between the localized versions, so please check, if data exports is available in “your” D365BC. 😉 If you cannot find it – should be, because the export report has a object number within the localization range – write to microsoft and let them know, that you want that feature in your localized version. 😀

Ok, starting with page “Data Exports” we can add one new data export, let’s call it BACKUP. Fill out the code and description fields.

Screenshot at 2018-07-22 14-41-11

Now we add a record definition set called “MASTER” for the master data. For that click on the according button, fill out the code and description fields.

One important thing: the dtd file, the file that contains the data structure. Without a dtd file it’s not possible to export data. In that case this can be done very simple, a concrete structure is not needed, only the xml declaration. Create a new text file, call it default.dtd, add following text line and save the file:

<?xml version=”1.0″ encoding=”UTF-8″?>

Now click on Import in menu group “Dtd File” and import that file. The file’s name is then added to the selected data record defition line.

Screenshot at 2018-07-22 14-53-05

Now lets go to the details. Click on button “Record Source”.

Screenshot at 2018-07-22 15-12-20.png

Here now add the master tables you want to export, e.g. tables 3, 4, 6, 9, 10, 13, 14, 15, 18, 23, 27 using the “New” button. With e.g. date filters you can limit the data to export. In the column “Export Filename” you get a suggested filename for the export file, per default ends with txt. Better change to csv. So the files can after the export easily opened in excel.

Also add all the fields, which you want to export, using the “Add” button in the Fields/Manage menu for the selected table.

That’s it. Go back to the parent page: Data export record definitions. There click on button “Export” in menu group “Process”.

Screenshot at 2018-07-22 16-06-38

After clicking OK a zip file is created and downloaded containing all the exported csv files. Alternatively you can schedule the export for a later point of time.

Screenshot at 2018-07-22 15-25-57

Also included is a file index.xml containing base data like company data, export name, list of exported files and the field names.

Screenshot at 2018-07-22 15-29-39

So, what we get here is a first backup solution for master data. At least we can export the current set of the master data at any time. You could create another data record definition for transaction data. After you have done that you’ll get in the end a complete backup solution for D365BC. 😀

Additional you could create a job queue entry for automatic export. Use report 11015 and set the recurring flags.

Screenshot at 2018-07-22 16-17-51

Set the request page Options as following:

Screenshot at 2018-07-22 16-18-04.png

cheers

 

User bulk import with powershell

the ps command to add single users in nav is new-navserveruser. detailed info can be found here:
https://docs.microsoft.com/en-us/powershell/module/microsoft.dynamics.nav.management/new-navserveruser?view=dynamicsnav-ps-2018
https://community.dynamics.com/nav/b/magnosblog/archive/2015/08/26/creating-users-with-powershell

i found a great ps script for bulk import:
https://marcellusnav.wordpress.com/2017/07/31/import-nav-users-from-csv-with-powershell/

to work with that, here is a tutorial:

* start the windows powershell ISE in admin mode. this is needed, because only then your are allowed to create new users in nav.

* create a csv text file with comma as separator. semicolon does not work here. save it e.g. as c:\temp\users.csv. check, if the windows users in the list are created on your server (AD).

UserName,FullName,Email
domain\user1,John,john@test.com
domain\user2,Adam,adam@test.com

* create a new text file and copy the script into the text file, save it as c:\temp\Import-NavUsersFromCSV.ps1

* in the ps ISE write “cd \temp” to change to the working directory.

* Import-Module .\Import-NavUsersFromCSV.ps1
to load the new script

* $Permissions = (‘SUPER’)
to set the default user permissionset for the new users

* at last:
Import-NavUsersFromCSV -NavVersion 100 `
-NavServerInstanceName ‘DynamicsNAV100’ `
-AuthenticationMethod Windows `
-ImportFilePath ‘C:\Temp\users.csv’ `
-PermissionSets $Permissions

result:
Creating domain\user1
Verbose: Opening admin connection to ServerInstance ‘MicrosoftDynamicsNavServer$DynamicsNAV100’
Verbose: Admin connection to ServerInstance ‘MicrosoftDynamicsNavServer$DynamicsNAV100’ has been opened
Verbose: Ausführen des Vorgangs “New-NAVServerUser” für das Ziel “ServerInstance = MicrosoftDynamicsNavServer$DynamicsNAV100, Sid = S-1-5-21-236
3956306-4252412874-2321867446-1054, WindowsAccount = domain\user1”.
Verbose: Closing admin connection to ServerInstance ‘MicrosoftDynamicsNavServer$DynamicsNAV100’
Verbose: Admin connection to ServerInstance ‘MicrosoftDynamicsNavServer$DynamicsNAV100’ has been closed
Verbose: Opening admin connection to ServerInstance ‘MicrosoftDynamicsNavServer$DynamicsNAV100’
Verbose: Admin connection to ServerInstance ‘MicrosoftDynamicsNavServer$DynamicsNAV100’ has been opened
Verbose: Ausführen des Vorgangs “New-NAVServerUserPermissionSet” für das Ziel “ServerInstance = MicrosoftDynamicsNavServer$DynamicsNAV100, Permi
ssionSetId = SUPER, Sid = S-1-5-21-2363956306-4252412874-2321867446-1054, WindowsAccount = domain\user1”.
Verbose: Closing admin connection to ServerInstance ‘MicrosoftDynamicsNavServer$DynamicsNAV100’
Verbose: Admin connection to ServerInstance ‘MicrosoftDynamicsNavServer$DynamicsNAV100’ has been closed
Creating domain\user2
Verbose: Opening admin connection to ServerInstance ‘MicrosoftDynamicsNavServer$DynamicsNAV100’
Verbose: Admin connection to ServerInstance ‘MicrosoftDynamicsNavServer$DynamicsNAV100’ has been opened
Verbose: Ausführen des Vorgangs “New-NAVServerUser” für das Ziel “ServerInstance = MicrosoftDynamicsNavServer$DynamicsNAV100, Sid = S-1-5-21-236
3956306-4252412874-2321867446-1055, WindowsAccount = domain\user2”.
Verbose: Closing admin connection to ServerInstance ‘MicrosoftDynamicsNavServer$DynamicsNAV100’
Verbose: Admin connection to ServerInstance ‘MicrosoftDynamicsNavServer$DynamicsNAV100’ has been closed
Verbose: Opening admin connection to ServerInstance ‘MicrosoftDynamicsNavServer$DynamicsNAV100’
Verbose: Admin connection to ServerInstance ‘MicrosoftDynamicsNavServer$DynamicsNAV100’ has been opened
Verbose: Ausführen des Vorgangs “New-NAVServerUserPermissionSet” für das Ziel “ServerInstance = MicrosoftDynamicsNavServer$DynamicsNAV100, Permi
ssionSetId = SUPER, Sid = S-1-5-21-2363956306-4252412874-2321867446-1055, WindowsAccount = domain\user2”.
Verbose: Closing admin connection to ServerInstance ‘MicrosoftDynamicsNavServer$DynamicsNAV100’
Verbose: Admin connection to ServerInstance ‘MicrosoftDynamicsNavServer$DynamicsNAV100’ has been closed

the “change password at next login” flag is not set. this is only set if you use the -ChangePasswordAtNextLogOn option with the New-NAVServerUser command.

 

Performance compare tests – Part 2

another test scenario:

same preconditions like in last post.
1. db: orig. nav 2017 demo db
2. db: to nav 2017 converted nav 2013 demo db

Now developed a recordload test with g/l entries. wanted to know the record load time per entry.

orig. nav 2017 demo db:
(total no. of entries) | (total load time) | (load time per entry)
run 1: 3186 | 282 | 0,088512
run 2: 3186 | 265 | 0,083176
run 3: 3186 | 250 | 0,078468

converted nav 2013 demo db:
(total no. of entries) | (total load time) | (load time per entry)
run 1: 2842 | 171 | 0,060169
run 2: 2842 | 156 | 0,054891
run 3: 2842 | 141 | 0,049613

the test code:
OnRun()
// dt / DateTime
// timePerLoad / Decimal
// noOfEntries / Integer
// totalTime / Decimal
dt := CURRENTDATETIME;
noOfEntries := IterateGLEntries;
totalTime := CURRENTDATETIME – dt;
timePerLoad := totalTime / noOfEntries;
MESSAGE(FORMAT(noOfEntries) + ‘ | ‘ + FORMAT(totalTime) + ‘ | ‘ + FORMAT(ROUND(timePerLoad,0.000001)));

IterateGLEntries() : Integer
glEntry.FINDSET;
REPEAT
glEntry2.GET(glEntry.”Entry No.”);
UNTIL glEntry.NEXT = 0;
EXIT(glEntry.COUNT);

also interesting …

cheers