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

  • Post comments:6 Comments

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 Reading A couple of AL controladdin demos – Google Maps and Tic Tac Toe

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

  • Post comments:7 Comments

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 Reading Off-topic: A C# lesson learned about conditional operators

Passing JSON from JavaScript to C/AL–Part 2

  • Post comments:8 Comments

I stand corrected. A month ago I wrote about how to pass JSON from JavaScript to C/AL and then handle it inside, and what I wrote is not wrong, but I just figured a simpler way.

Too bad all this is not documented, but hey – that’s why blogging is fun.

(more…)

Continue Reading Passing JSON from JavaScript to C/AL–Part 2

Passing JSON from JavaScript to C/AL

  • Post comments:4 Comments

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 Reading Passing JSON from JavaScript to C/AL