C/AL internals: Some more invalid object states

  • Post comments:8 Comments
  • Reading time:8 mins read

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.

(more…)

Continue ReadingC/AL internals: Some more invalid object states

C# Injection: Don’t trust FOB

  • Post comments:17 Comments
  • Reading time:4 mins read

FOBs, those pesky little files that we all take for granted, import into our databases, and live happily ever after. After you read this post, you’ll handle FOB files very, very carefully.

Why is that? Well, if you haven’t already, then read this post first: From C/AL to executable: how NAV runs your C/AL code

Good, now that we are on the same page, let me explain why you must never, ever, ever trust a FOB file.

(more…)

Continue ReadingC# Injection: Don’t trust FOB

Quick Tip: Extension Demo Data

  • Post comments:4 Comments
  • Reading time:2 mins read

Extensions are a hot topic these days. There was a ton of sessions at both Directions events, likely also at NAVUG, and most of the talks you could hear while mingling around was extensions this, extensions that.

Chances are – you are going to be writing your extensions in a foreseeable future.

However, there is a catch with extensions – while it may be easy to load them up into an environment, unlike Cronus database your extensions must populate the database with their own demo or starter data. Otherwise, they will be pretty much useless.

(more…)

Continue ReadingQuick Tip: Extension Demo Data
Read more about the article Module Binder Pattern proposal
Zlata Praha, by Roman Boed

Module Binder Pattern proposal

  • Post comments:7 Comments
  • Reading time:24 mins read

Whoa! This has been quite an event, the Directions EMEA 2016 in Prague. There has never been this many people (1.700+) and it was quite a pleasure connecting again with old friends, and meeting new friends. Also, it has been quite a pleasure listening to many good sessions, and an even bigger pleasure delivering four of them.

And this is why I am blogging now – to follow up on my promise during my Polymorphic Event Patterns for C/AL. I promised you that I’d post my pattern proposal online, and here I am doing it.

Let’s get started.

(more…)

Continue ReadingModule Binder Pattern proposal

From C/AL to executable: how NAV runs your C/AL code

  • Post comments:22 Comments
  • Reading time:12 mins read

A lot of folks write C/AL and never worry about what happens then. C/AL is written, NAV execute is, the story ends. The same way the story ends when you flush a toilet and the tank refills. How exactly? Who cares.

While understanding the inner workings of a toilet flush tank doesn’t necessarily make you more efficient at whatever it was that made you press the flush button in the first place, having a better understanding of exactly how NAV uses your C/AL code throughout its lifecycle is of arguably higher practical value.

Have you ever wondered what exactly happens to your C/AL code when you write it? How exactly does NAV run that stuff? Does it do any run-time interpretation, or does it compile C/AL into native code that runs on a processor? What does just-in-time compilation  mean and does it happen with C/AL? If so, when and why?

If any of these questions bother you, read on. If they don’t bother you, read on because they should bother you. If they don’t bother you because you know the answers, read on still, and then brag by poking holes in my explanation.

(more…)

Continue ReadingFrom C/AL to executable: how NAV runs your C/AL code