How to change primary key in Business Central Table

Recently one of my customer asked me to add few more fields on primary key and I was looking at the customer like he asked something which is daunting task to be done with business central as everybody aware of that we can not change the primary key fields when table is already having data as while deploying the app it throws an error as below

Even I tried using Force sync also but it is still failing to deploy the app as this is breaking change for the app.

Now question is how to do this and overcome from such situation as your customer is behind you to do that.

To make it work we need to use ObsoleteState and ObsoleteReason that means we need to make your table obsolete and create a new table with new primary key and change the references in all those object where the object is referred.

To make the table obsolete mention the property as below.

Obsolete property value

NoNot obsolete. This is the normal/default setting.
PendingWill become obsolete in a future version.
RemovedHas been made obsolete.

After making above table obsolete created new table with the new primary key.

Next point is how to transfer data in the new table .

To transfer data from obsolete table to new table used Installed code unit . Additionally you can use temporary table to update data from old table to new table.

If you would like to learn more about ObsoleteState Property then visit here.

Hope this will help you.

Stay tuned for more updates.


What is planned for Business Central Wave 2 2022 release

As we are gearing up for new release of business central and already the buzz is started for new version . Here I will list few upcoming features which I am looking forward in new version.

In-Client Performance Profiler

Demo tool and demo data for manufacturing scenarios

Users can export report datasets to XML

Introduce copy link option in the Share menu

Guided tour that helps users find settings and personalization tools

Support for rich text in teaching tips and tours

New capabilities for financial reporting with account schedules

Use Excel to design layouts for reports

Permission set handling enhancements

For more details please visit on my twitter or here

Business Central and Fonts on Reports

Today morning there was issue raised by my consultant stating that text on business central reports showing weird characters as below.

Though these reports was working well on On-Premise but after uploading to cloud it started showing those weird characters.

After checking report layout found that using the same fonts which is available on cloud version of business central but it still fails.

Why ? What could be the reason.

After checking found that customer created data in local language and to display those we need to have font which support those characters to show and I change the font on report and it showed correctly. (Surprisingly the font I used to show report data it worked properly and show data correctly and even it is not listed in the standard list .I think it depends on your country also)

On your own container you have leverage to install the font by using PowerShell command.

But for cloud please choose font wisely so it will not break your app.

Please see link for Available fonts on business central.

Hope this will help you.

How to discover reports and administration in business central role explorer

With the release of Business Central Wave 2 2021 aka BCV19 lot of new features has been added to make life easier of developer and/or customers.

One of new feature added in business central V19 for role explorer where in one can explore all the reports and other screens.

There is new button added on Business Central V19 as below

Once you click on this button all the modules will be displayed irrespective of assign role center.

There are few more options once you click on Explore More roles where in you can filter for reports or administration pages.

With this new features you can find all the reports or administration pages at one place efficiently.

Hope this will help to find the reports.

Stay tuned for more.

How to clean up data in business central

With the release of Business Central Wave 2 2021 aka BCV19 lot of new features has been added to make life easier of developer and/or customers.

To keep database performance always high and size of database in control we need to remove some data from database as part of maintenance .but after removing the data what if user would like to review the data again.

In new version Microsoft comes up with new extension called Data Archive.

The main purpose of this extension whenever you delete the records it will archive the records. With this extension archive data will be stored in JSON format in the extension. Media field is created for the storage of JSNO format (Data Archive Media Field)

Lets See how it works in reality

The archive data is stored in Tenant Media table which is not considered while calculating database size. If user would like to revisit some data then you might need to query Azure Cosmos database or you can export data in excel.

Hopefully this will help.

Next blog we will look into how to use the archive functions in AL code.

Till then stay tuned for more updates.

Non-Inventory Items and Locations

With the release of Business Central Wave 2 2021 aka BCV19 lot of new features has been added to make life easier of developer and/or customers.

Now from business central V19 onwards we can select location code for non-inventory items and it was having issue till version 18

Let See how to create Non Inventory Items

Go to Item Card

While creating Item select type as Non-Inventory. If the item is noninventory then Inventory Posting Group is disabled.

Let see how it works in Transaction.

Once you post this transaction then it will store the cost in Cost Amount(Non-Invtbl).

All these location will be copied to ledger entries.

Hopefully this will help you.

Stay tuned for more.

What’s New in Business Central Wave 2 2021

Do you remember this post of mine where in I mention Microsoft hosting an event for launch of Business Central Wave 2 2021.

Yesterday this event gone live and all the recordings are available to view till 31st December 2021.As like the most event this event is not live and all sessions are recorded and there will be no chat room or live Q & A sessions.

You can view the session by registering here  Join the Event and it will redirect you to following screen to register

Just register yourself and get the more details insight of features implemented in business central wave 2 2021 by going through above sessions.

I just gone through few session and found it very well explained and looking forward for all other sessions.

Stay tuned for more..

Microsoft Business central Event 2021 Wave 2

With the release of Business Central Wave 2 2021 aka BCV19 lot of new features has been added to make life easier of developer and/or customers.

If you are looking more insight for those features then Microsoft will host an event on 18th October 2021

You can join this session by registering it here. Join the Event

This event will have following on agenda

Hopefully this will help us to understand the feature in deep details.

Stay tuned for more.

App Installation Permission Denied in Business Central

Yesterday we were installing PTE app on production environment and it throw an error as below.

We are juggled by seeing this message and thinking why it is showing an error message when we are uploading extension by using administrator login which is global administrator.

To overcome this error there is new permission set has been introduced in business central wave 1 2021


You need to assign the above permission to install the app as below.

Hopefully this will help

Stay tuned for more.

Business Central allows to change App Name Publisher of app.

With the release of Business Central Wave 2 2021 aka BCV19 lot of new features has been added to make life easier of developer and/or customers.

Can we change App name and/ or publisher name to meet marketing branding ? If you ask me till V18 it was not possible to change that and in V19 it is possible.

Lets see how it works.

Here is my app.json file

Publish the app

Changed the app.json

Hopefully this will help to give branding name to your app even after published.

Stay tuned for more.