AL Object ID Ninja

  • Reading time:9 mins read

One of the biggest obstacles to AL team development (is there any other kind?) is object IDs. IDs are supposed to be easy: just pick the next free one and off you go. AL Language even helps by suggesting the next available one through IntelliSense. But you are most likely not the only developer on your team. As soon as you add another developer to equation, and both of you use the built-in AL IntelliSense auto-suggest feature, you are inevitably heading towards object ID collision. The more developers there are, the more active your repository is, the more likely the collision.

Obviously, without some kind of a back-end that coordinates object ID assignment – preferably in real time – is absolutely necessary. And teams have come up with various solutions to this problem. They include:

  • “Who cares!”: the most heroic one, no object ID collision will ruin your day. Bring it on – you say! I’ll handle you – you say! These teams spend a lot of time resolving collisions post-factum.
  • Object “reservations”: you create an empty object of the desired type, push just that, create a PR that does nothing by that, and launch into the Hail Mary mode until your PR gets merged. The slower your validation pipeline is, the more likely it is that more than one developer will be saying their Hail Marys at the same time, and guess what – Mary will help one of them.
  • “Hey, folks”: you yell to announce to everyone that you are about to take an object ID. Or, in more advanced teams, you run a Teams team (uh, did I mention “team?”). This approach is not too robust, but generally yields better results than the above two.
  • Excel: the ways this tool gets used, geez. It’s a spreadsheet calculator, for Pete’s sake, but people have been using it for everything ranging from shopping lists to, well, object ID assignment sheets.
  • “When you have a hammer, every problem you see is a…” BC! The ways this tool gets used, too! Well, heck, yeah, isn’t it so freaking obvious that people will just create a BC app and deploy it internally so that everyone can use it. BC has nearly all facilities you need (that none of the above approaches does): primary key validation and concurrency. This is a very advanced stage in the evolution of object ID collision management solutions.
  • Automation. Yeah, baby! Now that there is a BC back end, and BC has APIs, let’s build an API that gives you next number, and then let’s do some front-end that fetches that from the back end, and then let’s somehow embed into VS Code. There is at least one tool that I know of, that does exactly this. And good that I didn’t know of it that Saturday morning nine days ago, because I would have zero motivation to take this evolution one big step further.

This is where AL Object ID Ninja joins the show! It’s zero-configuration, crazy-fast, mind-bogglingly simple solution for no-collision object ID assignment in AL. If you haven’t already (and if you are using Waldo’s AL Extension Pack, chances are you already have) go fetch yourself a copy.

Continue ReadingAL Object ID Ninja

Inside Git: Branches

  • Reading time:2 mins read

It has again been a while since I blogged – or video-blogged for that matter. I won’t offer any excuses – I’ve been very busy over the past month. I delivered two public webinars, both of which were fully booked and ended up very successful. The first one was Leveraging Git, and it was the first public redelivery since January. The second one was CI/CD from AL Developer’s Shoes, and this was the first iteration of this one that practically consumed all free time I had. That one is to blame for me not blogging or broadcasting for more than four weeks.

Cool, now that I am done with the excuses, it’s time to move on. Today I’ve finally had time to go live again with a new episode of Vjeko.live. Since I am so busy with Git these days (and webinars are only a part of my being busy with Git, in fact), I’ve decided to deliver another short “inside Git” session. This time it was branches, and I went into what branches actually are in Git, how Git stores them, what happens when you create a branch, check out a branch, or delete a branch.

If you missed the live broadcast at 4PM today, you can follow it at your own convenience here:

If you want to learn more about branches, don’t miss my next public webinar in two weeks: Git Branching Models and Strategies.

See you in the cloud!

Continue ReadingInside Git: Branches

Git storage – SHA1

  • Reading time:18 mins read

If you have ever worked with Microsoft’s Team Foundation version control tools, it wasn’t easy to switch to Git. That’s not because Git was complicated – no, nothing like that at all! It was simply because you had to forget almost everything you thought you knew about version control, and then learn it anew.

There are many fundamental differences between Git and TFVC, and one of the more obvious ones to any newcomer to Git is this:

If it wasn’t obvious on the first go, TFVC is on the left, Git is on the right

No, it’s not about the caption here. Indeed, TFVC calls individual snapshots of changes “changesets” and Git calls them “commits”, but that’s just terminology – the term in itself is not a fundamental difference. I am after something else here.

Continue ReadingGit storage – SHA1

What’s new about interfaces in 2021 Wave 1

  • Reading time:8 mins read

Microsoft Dynamics 365 Business Central 2021 Release Wave 1 is out (whoa, that was a mouthful) with some new perks for developers. Today, I had another live session at http://vjeko.live, and I made it both the first one in the series of What’s New for the latest release, as well as the episode four of Fun with Interfaces.

Interfaces are such an amazing feature in AL language, that was long missed, and that’s now saving my day nearly every time I do something with AL. The latest AL compiler (runtime “7.0”) comes with these new interesting features about interfaces:

  • You can mark interfaces for obsoletion.
  • You can mark individual interface functions for obsoletion.
  • You can return interfaces as return type from functions.
  • You can define UnknownValueImplementation for enums to specify the interface that represents any unknown enum values.

Let’s take a look at each one of those with examples.

Continue ReadingWhat’s new about interfaces in 2021 Wave 1

Webinars in the upcoming period

  • Reading time:10 mins read

My last two webinars were a great success, and this is not only judging from my angle. Attendees were very happy with them, and the feedback I received was overwhelmingly positive. I’ve got a lot of inquiries about repeating them, and I also got a few ideas for new ones that would allow you to build on top of the knowledge gained in the first two.

So, today I am announcing the schedule for the webinars for the next three months.

Continue ReadingWebinars in the upcoming period

Webinar: CI/CD from AL developer’s shoes

  • Reading time:3 mins read

I am postponing this webinar! It appears that it coincides directly with a webinar held by Arend-Jan Kauffmann, so I’ll announce different dates for this one soon.

This webinar is moved to May, please check the sidebar.

After two very successful webinars about Git internals and Git branching models and strategies, I am now announcing the next one, titled CI/CD from AL developer’s shoes.

When talking about CI/CD, one word typically pops to mind: pipelines. But pipelines is just one aspect of this much wider and bigger topic. Let me just say this: Continuous integration was conceived a long time before anyone was thinking of pipelines. Continuous integration and delivery are sets of practices, a philosophy if you want, that must go through into every pore of the development process before pipelines can make much sense.

And while previous two webinars were almost agnostic of AL, and were presenting Git and related processes from nearly a pure Git perspective, this webinar has AL in central focus, and presents this important topic from the angle of an AL developer.

Continue ReadingWebinar: CI/CD from AL developer’s shoes

Conditional directives

  • Reading time:2 mins read

One of the new features of the AL compiler that arrived with 2020 Wave 2 is Precompiler directives. This is nothing spectacular, programming languages had these kinds of things since the dawn of programming languages, and now we have them too.

The biggest thing, though, is that on their surface, just like so many other features (cough! interfaces, cough, cough, interfaces) you can’t really grasp their full power just by reading the documentation available.

Continue ReadingConditional directives

Resident control add-ins – no SingleInstance

  • Reading time:10 mins read

My last topic was resident control add-ins. In my video and written blog I’ve explained what they are and how you can quickly have them up and running. However, there was one particular thing I said I generally don’t like – single-instance codeunits. So my second blog on this topic focuses precisely on that: how to make your control add-in available to your AL code from everywhere, without having to rely on a single-instance codeunit.

Continue ReadingResident control add-ins – no SingleInstance

Webinar: Git branching models and strategies

  • Reading time:2 mins read

A few days ago I’ve announced that there will be a new series of webinars. The last webinar was a success. Apart from a few people complaining that I talked fast, and that there was too much content, I got pretty good comments. People felt quite happy with the content and that the value they received was worth the money they invested.

One thing I’ve learned was that you want to learn more about various branching models and strategies. One thing is talking about Git from the technical angle – that’s what the last webinar was about; this time I am focusing on the strategy, how to make Git work inside your organization and how to organize your repository and workflow.

Continue ReadingWebinar: Git branching models and strategies

Resident control add-ins

  • Reading time:7 mins read

One of the most common questions I get asked about Control Add-ins is whether you can make a control add-in be always present and able to respond to your calls from AL. In other words: can you have a resident control add-in that you can invoke from anywhere in your AL code.

I’ve done a lot about control add-ins. However, I’ve never done resident control add-ins for real; all I know about them is pure theory and then some playing I did at various points of time. Still, this is an interesting topic that I wanted to address some way or other.

So, yesterday I did a live session about it.

Continue ReadingResident control add-ins