And then there are “Object Numbers”??

Walk with me through the learning curve of a developer who is new to Business Central. We’ll assume he/she is familiar with modern web development.


I’ll give Microsoft the WOW effect. When you spin up Business Central you get more than you bargained for. Where other frameworks show you a hello world and an example of how to call a web service and display the results in a table Microsoft really gives you an incredible experience to start with.

First, there were “Pages”

When you start customizing the User Interface of Business Central you’ll probably, sooner or later, end up with an extension that has some page extensions. If you look at them you’ll probably expect some HTML and some JavaScript.

This is not entirely true, but it’s not that far off. The way pages are constructed using metadata is not that much different from Razor or Angular and if you are familiar with JavaScript you can probably figure out how to read AL code.

So pages are approved. For a good reason because pages were designed as a first class three-tier citizen about a decade ago.

Now to add some custom code

Next thing you want to do is to add some logic. Being a good developer you don’t want to add too much code to the UI so you start looking for the “back-end” system. Where do I write C# and how to I map this to these “pages”.

You’ve noticed that pages map to something that is called a “table”. This is weird, but ok, what’s in a name, it kinda looks like a class and there is mapping between this “table” and these “pages”.

A table looks like a class. It has properties, although they are called “fields” and there are methods which are called “procedures”.

Then you browse further in the documentation and discover a “codeunit” object. Now you are completely confused because a table and a page can be mapped somewhat to what you are familiar with, but this “codeunit” only allows for some procedures. There is no constructor, no properties.

What are these numbers anyway?

By now you’ve probably bumped into the fact that all “objects” in Business Central need to have a number and to understand why you need to understand how things work after you’ve completed your extension.

But we are NAV developers!

I was probably wasting your time because there are no developers who are new to Business Central, there are only NAV dino’s trying to do what Microsoft asks them to do. Move to Extensions.

Off all the heritage that Business Central gets from NAV, object numbers are probably the most awkward one, especially if you take away C/Side where they make a lot of sense.

I’ve always tried to use Object Numbers to group my objects together that belong together. True, it’s not easy because you always have more pages than tables, but with a little help of Statical Prism and Upgrade Codeunits you can keep a clean schema.

What Would You Expect?

Modern developers expect namespaces and true objects, not a file that is called an object because in the legacy system this file was stored in an Object table.

Most of you have probably given up by now but object numbers are important in combination with C/Side but they become extremely cumbersome in Business Central. Especially now that Microsoft is allowing the world to code for free in any object between 50.000 and 99.999. Who the f*ck is ever going to go through AppSource if you can sell your solutions for free!

But who is going to make sure object numbers are not already taken? How do you manage renumbering and updates?

I give up…

In Dutch we have a saying, it’s neither meat or fish. Without C/Side object numbers don’t make sense and in an object-oriented world a table and a class are the same with the difference of not writing data to the database.

So why are these numbers important Mark?

I promised you to explain it, didn’t I?

Many of you, or most of you, think that Microsoft wrote a new compiler for Visual Studio Code, but this is not true. It’s more of a pre-compiler or syntax checking tool that you run in the fancy modern world of VSCode where everyone can write a compiler.

When you publish your extension the real compiling begins and this is where “not much has changed”. This is not 100% true, but behind the scenes Business Central still generates C# code and these C# files get named with the object number.

If you manage to mess up the compiler, something I did last week when trying to create a Matrix Page, you’ll get a weird error message that C50000.cs does not allow to convert a NAVInt to a NAVDecimal or something along those lines.

Now, I’m not going to explain to all you kids what a Matrix Page is and where that came from, that is a bedtime story for another time.


Why C/Side deserves one more round. At least…

I use Extensions and Visual Studio Code in my daily life. Or at least for a while, nowadays it’s more something in my weekly life. I try to avoid them when I can.

Not because they are bad or evil but because they slow down my productivity, and because I have legacy software.

Almost everyone I talk to agrees that programming extensions is slower and more clumbersome than C/Side. Not just the first few weeks.

Continue reading

Using Business Central as Microservice

Opinion, by Mark Brummel

Upgrading software is hard. Not because merging software is hard. It’s hard because people are creatures of habits.

Let me give you an example. We recently upgraded from NAV 2016 to NAV2018. This means big changes to the Customer Card. I’m fine with that. While in the process I moved my customizations to a Page Extension and I was a happy IT manager/developer.

Continue reading

Project Green – The final battle? (CDS 2.0)

Opinion, by Mark Brummel

When Microsoft closes a door, they open a window. Sure I miss working with the classic client where I could make forms look however the customer wanted them to look. All the colors available withing the RGB pallette, a simple report designer and the database is one file.

Continue reading

Business Central, ERP or Development Platform?

Sometimes you need an external signal to rethink your strategy. This morning I read this tweet on my timeline.

Funny to me because I don’t see NAV or Business Central as an ERP first, I see it as a Development Platform first with some ERP for free. One that I know inside out better than almost anyone else.

How do you see it? Should we expect Microsoft to take a new approach with ERP first and Development Platform second? For years, or maybe even a decade, everything around NAV was about technology and developers.

With the API present and other development platforms superior it would not surprise me that Microsoft changes this strategy.

Should this old dog learn new tricks? What is the learning curve? Which other platforms? Share your opinion please!

Don’t forget to register for today’s webinar and let’s see if we can find out what happens to C/Side and Object Files. To Fob or not to Fob, that’s the question.

About Roadmaps and Domino…

Opinion, by Mark Brummel

Yesterday I got an email from WordPress with a notification that my blog was down for a quick moment because they had to scale it up to a larger server because of the trafic. They also sent an email to Mark Zuckerberg to please notify ahead next time if there are to many people refering to the same website.

All jokes aside… there have been some unexpected side effects from some of my previous blogs that I want to address.

Continue reading

Microsoft Dynamics 365 Business Central ≠ Microsoft Dynamics NAV

Opinion, by Mark Brummel

Continued from previous posts

My daily driver is a Defender. You tech nerds should know enough but for those of you who don’t, a Land Rover Defender.

It’s 18 years old. I bought it a few months ago after a lot of research. I needed  a car that can carry at least two adults, five kids, preferably more if they bring friends, a dog and luggage.

Continue reading