A couple of AL controladdin demos – Google Maps and Tic Tac Toe

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

As a part of preparation for my last event of this year that concludes the conference season 2017 for me, I played around with the latest addition to the AL language stack for VS Code: control add-ins.

If you haven’t already tried it out, or heard about it, then you should get yourself a copy of NAV developer preview, and then visit the Control Add-In Object documentation for AL on MSDN to learn a little bit about how it works. The demo provided over there is, well, basic, to say the least, so I prepared two demos.

(more…)

Continue ReadingA couple of AL controladdin demos – Google Maps and Tic Tac Toe

Off-topic: A C# lesson learned about conditional operators

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

If it was hard to write, it should be hard to understand, that’s an unwritten rule-that-rules-them-all of programming. You absolutely love to apply syntactical stunts to impress your coworkers, especially if you do C# and they don’t, don’t you?

One of those stunts (at least from C/AL) perspective is a C-language type common feature known as conditional operator. It allows you to write this:

a = b ? c : d;

when you would normally (in C/AL, for example) get more eloquent:

if (b == true)
{
    a = c;
} else {
    a = d;
}

This (b == true) could have been replaced with just (b), but I put it there for clarity.

But! (There is always a “but”!)

(more…)

Continue ReadingOff-topic: A C# lesson learned about conditional operators

Passing JSON from JavaScript to C/AL

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

Yesterday, I said I was closing this year of blogging, but I wasn’t really. Closing a year with 39 posts, and leaving a question lingering, wouldn’t be too fair, would it? If you read my last postabout how to pass objects from C/AL to JavaScript, you must have wondered if it’s possible to also pass objects from JavaScript back to C/AL.

Wonder no more. It is. And here’s how.

(more…)

Continue ReadingPassing JSON from JavaScript to C/AL