Take your C/SIDE development to Git and Docker with NAVBaaS Git

I’m very happy to announce that my first Visual Studio Code extension called NAVBaaS Git has been released last Wednesday.
The people who attended the session about Continuous Integration at the Dutch Dynamics Community event already had their first glimpse at the brand new extension and I really hope that people are or will be excited about this extension 🙂

Source control is step one if you want to do professional development and with source control in place you’re able to take the next step, which is Continuous Integration!
(more…)

Generating AL symbols at compile time

When running AL and C/SIDE side by side you always want to have your symbols up to date, this can be done by starting up finsql.exe with the parameter generatesymbolreference=yes as described here, but it’s also possible to generate symbols at compile time when using the Compile-NAVApplicationObject cmdlet.
(more…)

Retrieving NAV Docker images from the registry API

It can be very handy to know which NAV Docker images are available on Microsoft’s public Docker repository, you can either do this the boring way by browsing this website (it will only show the 100? most recent tags) or the cool way by using (obviously) PowerShell.
(more…)

How do I: test code that calls external web services

With the current test framework and it’s limitations it can sometimes be hard to find a way to test your code, this gets even worse when external web services are called.
I’ve seen a number of (bad) workarounds in the last few months varying from calling a nonexistent endpoint to a self-hosted web service to test against.
Of course those workarounds do their job but we can do better than that, and let’s not forget tests must be independent of external components!

Ideally we would simply mock this web service call and return some data we can test against, but not in (C/)AL right?
(more…)

NAV2018: xRec in OnModify

Every now and then a developer takes the xRec bait and they’re wondering why their code doesn’t work and it usually ends up with a lot of lost time combined with a good amount of frustration.
I hope most of you do know that if you trigger the OnModify through code and xRec is used in the OnModify trigger, Rec and xRec will be the same, however it works fine when it’s triggered through the UI. (more…)

Test libraries available for extension development soon!

With AL you can already create test codeunits, write test functions but you have to use your own libraries because all functions in the standard libraries are not marked as external..
After reporting an issue on GitHub Microsoft confirmed they’ll be marked as external in the January update!

In my next blog post I’ll show you how to get your docker development environment up and running with the test toolkit.

Moving your old dusty c/side dev environment to docker

The time has come, we can finally run multiple NAV versions, cu’s and localization’s side by side with Docker, but how do we actually move our old and dusty c/side development environment to a modern place? (more…)

Running automated tests for modified/selected objects

In the ideal world you have a nightly build, creating your entire solution from scratch, running all the automated tests that come with standard NAV and so on.
During business hours you basically want the same thing but a lot faster, you want to have feedback about your modifications as quickly as possible and running all the tests might be unnecessary and it’s very much time consuming.
(more…)

NAV2017 Notifications Part 3: more about the ID

So today a colleague referred me to this page on MSDN where it states the following about the ID:
If left unassigned the notification will be assigned an ID when the SEND method is called. For more information, see SEND Function (Notification).

So this sounds like giving your own unique ID to the notification is not that necessary at all, right?

After some testing it appears not to be that easy..
As I mentioned in my first blog post about notifications a notification without a unique ID can cause a huge stack of duplicate notifications on your screen and we DO NOT want that at all.

If you leave the ID empty and you let the SEND function generate an ID for you, the ID will be kept in memory BUT only if the notification variable is kept somewhere global (I hope you won’t even consider doing this)
You can think of all kind of fancy functions that will return the ID that the SEND function has generated for you, but in my perception the way to go is to create a function per notification to retrieve the hard coded guid.
P.S. this is also the way Microsoft is doing it.

Web Client dynamic visibility of fields and page actions

Dynamic visibility of fields and page actions behave different in the web client, make sure you are aware of the following limitations.

Fields:
– Code in the visibility property will not work
– Using a variable to determine visibility only works once
– On a group this works as expected, workaround is to give those fields their own ‘invisible’ group

Page Actions:
– Code in the visibility property only works once
– Using a variable to determine visibility only works once
– Giving these page actions their own group works but images are not shown correctly, no-go
– Use the enabled property as a workaround, this behaves as expected (Microsoft is doing the same)

Also check out this post from Arend Jan Kauffmann