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
Value
Description
No
Not obsolete. This is the normal/default setting.
Pending
Will become obsolete in a future version.
Removed
Has 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.
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.
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.
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
EXTEND. MGT. – ADMIN
You need to assign the above permission to install the app as below.
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.
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.
There is new feature added in business central to control address where country/region code is used.
New option added on general ledger setup to control country/region code that means if this field is checked and if user change the country/region code then it will clear the values from related fields like city ,state and zip code.
Navigate to General Ledger Setup.
If the option is not ticked then following is behavior
If the option ins general ledger setup is ticked then it will not clear the address fields.
Hopefully it will help in controlling the address.