All posts by Vjeko

The “IF COUNT = 1” Conundrum

If you haven’t read my yesterday’s post, then do that first.

Good. At this point you are extremely smart because you know that you should never use COUNT = 0 but should use ISEMPTY instead.

However, what if:

IF SomeTable.COUNT = 1 THEN

Well, if this is what you need, then that’s what you need. And that’s exactly what we needed in the team a few days ago.

Continue reading The “IF COUNT = 1” Conundrum

Are there any records there?

It’s been a while that I haven’t blogged, and my queue grows inversely proportional to the amount of time I have available for blogging, so let me do a short series of easy stuff, simply to take it off the list.

This is not about new features, crazy new tips and tricks or anything of the sort. It’s just a couple short lessons on performance and how to reduce your carbon footprint and make the planet last longer.

It’s about how to properly ask the database: are there any records there?

Continue reading Are there any records there?

Better late than never: NAV TechDays 2016 goodies

This year my work got a better of me. For five years in a row I have posted all my demos and materials from NAV TechDays sessions right after them. However, this year, I failed. And I apologize for this.

But, as the saying goes, good things come to those who wait, and here it is – all the materials from my “JavaScript Architecture: Turning Pain into Gain” session are here.

Continue reading Better late than never: NAV TechDays 2016 goodies

Finally. Not quite, but still – finally! We finally get the first public glimpse of future of AL code writing, courtesy of Microsoft Dynamics NAV development team.

As you might know, Microsoft is working around the clock to enable new kind of programming for NAV: using Visual Studio Code instead of Microsoft Dynamics NAV Development Environment. They announced it with due fanfare at Directions US, Directions EMEA, and NAV TechDays, and now the NAV community is biting their fingernails off waiting for Microsoft to actually release the thing.

They said some kind of preview will be made somewhat available sometime in December this year, but for now we have got the first glimpse of the new AL syntax.

Continue reading

C/AL internals: Some more invalid object states

If you have followed the posts about how C/AL really executes in NAV, you know that C# and C/AL can sometimes be in a state where C/AL compiles, but C# does not, causing you some headaches during run time.

However, what might not be obvious is that there are situations where C/AL does not compile anymore (typically due to a changed dependency signature, or due to an object that went AWOL) but C# not only compiles, but also happily runs as if nothing is wrong in the first place.

These situations can be confusing, and after having read my original post, my friend Heinz has pointed out to those situations and asked me if I can explain them. So, here it goes.

Continue reading C/AL internals: Some more invalid object states