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 […]

Importing Data Easily with MagicalRecord and CoreData

One difficulty I’ve come across when trying to use Magical Record’s MR_importFromObject method, was that the primary key attribute was not my entity name plus “ID”. And the tags used in the file being imported were also different from my entity attributes. To indicate which attribute must be considered as Primary Key (since categoryID does not […]

Image numbering batch process

I’ve made an image using Photoshop and I wanted to create nearly 30 images that look the same but with incremental numbering. Photoshop has a great feature that let you do just that or even more! Photoshop has variable data functionality built in, but it’s not terribly well documented. You’ll need a comma- or tab-delimited file […]

Running an object opens a new session

I was using Dynamics NAV 2013 R2 stock version and i’ve installed the cumulative update 6 for Dynamics NAV 2013 R2. After that, when I try to run an object in the Development Environment, a new Dynamics NAV session is opened instead of running the object in the currently opened session. This happens because in […]