Renumbering AL objects

Wow!

Today I really had the Wow experience with Business Central. And I really mean Wow, not WoW. But first things first.

We are going live with one our hosted customer, running on subscription license, but OnPrem installation hosted in Azure (no Czech online BC available yet, wrong timing). Because some changes were developed as PerTenantApp (PTA), I wanted to extend the license with the custom object range as usual. But there were no tables or pages sold to the subscription license, thus only the "build in" IDs possible to use - 50000..50009 and 50000..50099. But because we decided to assign ID ranges to the PTA centrally across all customers to prevent possible conflicts in future, the used ID Range was different. Preparing the release, I hit the limitation that you cannot reassign the "default" objects included in the license (in world of Apps, this is really outdated limitation going against the apps, but this is another story). 

Result of this was decision that the PTA must be moved to the ID range 50000..50099. Ok, no problem to do that in AL. Change the ID Range in app.json,  go through the objects, remove ID, let VSCode suggest new one. Fix some small things like LookupPageID and DrilldownPageID and I am done. Because the app was installed only on our QA database, I expected that I will force the synchronization after the CI/CD pipeline will fail. Commit, push, wait.

No error from the pipeline is comming...

Ok, what is wrong...

Checking the pipeline...

Successfull?

There must be something wrong...

Opening the QA database...

Opening page from the App...

Table have data...

Ok, it will be the old App installed still...

Ctrl+Alt+F1

Table 50000, Page 50000...

WOW!!!!!

REALLY SURPRISED!

Yes, it is true. The IDs of the objects means in AL nearly nothing. If it is possible, AL is working with the names, not IDs. It means you can renumber the objects and it have no impact to the schema. No breaking change! Of course, you can have some side effects when you are using somewhere the IDs in data or in wrongly designed dirty code. But publishing and installing and upgrading have no problems with that! If future proves me wrong, no problem. But if this is really true (have not tested it through all possible things), than it is hidden gem.

Welcome in the world of AL! Great!

Guys, really, time to get rid of the IDs from your al file names ;-)

Anonymous