It’s not often that I post something here, but I find myself returning to my blog to find tricky SQL statements. This time it’s about comparing data between companies. Let’s say you have a large number of companies and you want to compare data in a specific table to see differences. This script will give […]
Access Business Central API’s in Azure
Business Central comes with a set of API’s that you can access from other applications. When running BC in Azure you can choose between basic authentication and Oath 2.0. The latter is preferable since the requesting app does not need to store user name and password. The user will input these when giving consent for […]
Use Excel to create a permission set
When developing in AL creating permission sets isn’t the must fun thing to do…. I thought it must be possible to find a better tool than editing the xml file manually and found some inspiration here. Based on that I created this excel sheet that you can use to create a permission set xml file. […]
AL and SOAP
This sample is based on a page extension for page 8 (Currencies) where an action for downloading exchange rates from the Swedish State Bank has been added. The logic itself isn’t super advanced and it requires SEK as local currency. The focus here is to show how to: Create SOAP request XML Do an HTTP […]
Unix Datetime UTC
Here’s a little trick to generate a Unix Datetime in UTC. PROCEDURE DT2UnixDTUTC@81237(DtIn@81200 : DateTime) : BigInteger; VAR DtOffset@81203 : DotNet “‘mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’.System.DateTimeOffset”; DtUtc@81206 : DateTime; Duration@81208 : Duration; TempDate@81209 : Date; TempTime@81210 : Time; BEGIN EVALUATE(TempDate, COPYSTR(FORMAT(DtIn, 0, 9), 1, 10)); EVALUATE(TempTime, COPYSTR(FORMAT(DtIn, 0, 9), 12, 8)); DtUtc := CREATEDATETIME(TempDate, TempTime); Duration […]
Json, REST and Zendesk
Many of us have been using XML and SOAP for a long time now. This time my task was to create tickets in Zendesk based on events in NAV. I soon discovered that Zendesk uses REST web services and that it talks Json…. 😯 I soon found Gunnar Gestssons blog post on “JSON meets NAV“. […]
Blocked add-in files after copying CU-files to an existing NAV installation
Have you ever had problems with add-in’s after you have copied files from a CU to an existing installation? The reason can be that the dll’s are blocked since they are downloaded from internet to your local hard drive. Windows keeps track of zone information as meta data linked to each file and block the […]
Data Exchange Definition for Yahoo Exchange Rates in NAV2016
It seems as there’s some issue with the Data Exchange Definition for Yahoo! Exchange Rates that NAV creates automatically when you open the Exchange Rates Services. When I previewed the exchange rates I got an empty list. The debugger showed that there’s an error in a try function because of the file format doesn’t correspond […]
TableType::ExternalSQL
One very cool feature in NAV2016 is the table type “ExternalSQL”. In older versions you had to use a view in SQL for each table and set the property LinkedObject. Now you don’t have to do that any more. Let’s take a look at it: Here you can see how you can use TableType, ExternalName […]
AltSearchField in NAV2016
The property AltSearchField is removed in NAV2016 but importing an object from NAV2015/2013 which had that property set will still keep the property value even though it’s not visible in the development environment. This might not be an issue until you try to rename the field that is set as AltSearchField. Then you’ll end up […]
Permission error during database conversion
I’m upgrading a database from 2009 to 2016. In that process I first convert the database to 2013 format so I can export and import fob files in 2016 (which isn’t possible directly from 2009). When converting the database I get a login error in the middle of the process: Microsoft Dynamics NAV Development Environment […]
Log your changes
From time to time we get into the situation where we need to run a batch report to update data in NAV. It’s always nice to log changes and there’s an easy way to do it by calling the standard Change Log functionality. This example blocks all Norwegian customers and writes the changes to the […]
Find the function code
Did you know that since NAV2013 you can press F9 in the list of functions and the C/AL Editor will position on that function and nNot on the trigger code of the field in the field list as before. I didn’t know that…. Now we both know 🙂
Fixing the logo size
When you’re working with images in RDLC reports you often need to create images in a fixed size that matches the image box in you report definition. One of Clausl’s many great reporting blog posts is about a workaround to prevent unexpected lines on the image border. Clausl use the freeware Paint.NET which can be […]
Faster Vendor Invoice entry
My #1 tip for a faster Vendor Invoice entry is to use standard purchases codes and to add this code in table 38: Vendor Invoice No. – OnValidate() UpdateInwardHeader; //>>New code StdVendPurchCode.SETRANGE(“Vendor No.”, “Buy-from Vendor No.”); IF NOT StdVendPurchCode.ISEMPTY THEN StdVendPurchCode.InsertPurchLines(Rec); //
Missing icons in Tablet Client
Did you start the Tablet Client and wonder why these two icons didn’t show up? If so You are probably missing a MIME-type on you web server. Open the IIS Manager and select your NAV Web Site. Then double click MIME-types and search for “.woff”. If you can’t find it then right click, choose […]
Updating data in multple companies using TSQL
Updating data in many companies can be very time consuming. To do this I often use TSQL code which loops the company table and does what I want to do in each company. Please observe that what you do with this is totally on you own risk. Updating through SQL does not trigger validation code […]
Speeding up Step 2 in NAV upgrades
When upgrading NAV time is often a critical factor. especially when the database is big, has many companies and users. Running the data conversion can take several hours or days and meanwhile the business stands still. One change in version 2013 from previous versions is that User ID includes the domain name. This means that […]
Bye bye Ansi2Ascii (and welcome unicode)
Until NAV2013 I think I’ve used ANSI/ASCII conversion in pretty much every project, and Unicode has been a no-no. From NAV2013 we can use .Net to take care of conversions. In this example I support DOS-PC8, Codepage 1252 and UTF-8 when importing a textfile. The format is specified using an option field in a setup […]
Changes in MPN ERP Competency Requirements
Microsoft has significantly changed the requirements for ERP Silver/Gold. “Effective August 15, 2014, Partners gaining their MPN ERP Competency through the sales of Dynamics GP, Dynamics NAV, Dynamics SL, Dynamics RMS, or Dynamics C5 no longer are required to pass certification exams. This includes pre-sales and sales assessments as well as implementation methodology and technical […]