In my previous article Dynamics NAV Server hack by examples I’ve enumerated some tips on how to create and maintain NAV servers in a very hacky way. In this article I want to show you how to use Powershell modules with the same NAV/BC version but different cumulative updates on the same machine. Please note […]
Category Archives: Dynamics NAV/365 BC
C/SIDE to AL Table Data Migration
In the last weeks I’ve read a few posts about C/SIDE to AL Data Migration and as far as I understand people are struggling to have data migrated from C /SIDE to AL tables. Data upgrade codeunits to the rescue. They exist in C/AL and exists in AL as well so you should use and […]
Dynamics NAV/BC – Events Stack Logging
This post shows you how I created a logging system to know when, from where and by whom an event was called. The following solution can be used in Dynamics NAV 2017 or later because it uses TryFunctions and the GETLASTERRORCALLSTACK command. (In Dynamics NAV 2016 TryFunction is available but I’m not sure if GETLASTERRORCALLSTACK […]
Printing on roll paper in Dynamics NAV
I want to show you how I was able to print invoices and credit memos (or other reports) on a roll paper printer from Dynamics NAV. I was using Dynamics NAV Universal App in a tablet with Android and I wanted to print to a printer connected via Bluetooth. If you tried it, you’ve already found […]
Dynamics NAV Server hack by examples
If you want to handle different Dynamics NAV Server versions, ServiceTierAdministration is the way. No doubt about it. You may download it from Mibuso: https://mibuso.com/downloads/service-tier-administration-tool But you can do it using Windows sc command and/or hacking the Windows registry. So let’s learn how to do it by examples: 1. How to create a new service instance named […]
Excel Buffer – Detect Excel’s Language
Dynamics NAV allows you to “easily” export information to an Excel file, via code, using the Excel Buffer table. To export a cell value as a formula, you may add and use the following function to your object: LOCAL EnterFormula(RowNo : Integer;ColumnNo : Integer;CellValue : Text[250];Bold : Boolean;UnderLine : Boolean;NumberFormat : Text[30]) ExcelBuf.INIT; ExcelBuf.VALIDATE(“Row No.”,RowNo); […]
Error importing NAV License in AzureSQL Database
When opening a database installed in AzureSQL, you may get this error: The database on the server requires a Per Database license to be opened on SQL Azure You must use Powershell to import the Dynamics NAV license. To import a license file to a AzureSQL database I used the following command: Import-NAVServerLicense DynamicsNAV100 -LicenseData ([Byte[]]$(Get-Content -Path […]
Using SQL Profiler to find COMMITs (and other Dynamics NAV code)
Everyone of us has already experienced an unexpected COMMIT in the middle of a posting routine, for example, that prevents the full rollback from happening whenever there’s an error. You can always use the debugger to track the code and step into it, line after line, trying to find where the commit is. This will work but will […]
Showing item tracking lines in layouts (invoice, orders, transfers, etc)
As you may already have notice, standard commercial layouts (invoice, credit memo, order, etc) don’t show item tracking lines. Everytime our customers need to have this, they ask us to show the item tracking lines below each item line. Here’s how I did it, following the standard way available in the Sales – Shipment report […]
NAV 2015 Webservices (simple) connection problem
I was preparing a training session about Dynamics NAV 2015 and I was using a Cronus database that was already installed in my computer. I’ve added the Customer Card to Web Services and published it, just to test it. When I was going to connect to the webservice using .NET WS Studio, I got the […]