Renaming Function in Business Central


Most of the time, you won’t get to use the rename function in Business Central unless you are patching some data that requires the updating of table keys. Changing of table's primary key(s) is a straightforward process. However, some limitations need to be highlighted.
Tables that have the “Document No.” field and/or “Document Type” are not allowed to be renamed for legal or business reasons. A few examples are:
Table 36, Sales Header
Table 38, Purchase Header
Table 5405, Production Order
Table 5766, Warehouse Activity Header
You can refer to this Microsoft reference page for more information.
There was a real-life scenario that I had seen regarding the above. Due to some issues (human or system), the users had created a bunch of Sales Quotes with Quote Nos. that does not fulfill their business requirement. There is a need to change those Quote Nos. to the correct running order.
As stated in the Microsoft documentation, we are unable and not allowed to rename the primary keys for the affected Sales Quotes via processing report. What we did was to use Configuration Package to import a duplicate of the affected Sales Quotes with the correct Quote Nos and then delete those Sales Quotes which had the wrong Quote Nos. That worked out well.
Thankfully, the users had not created any Sales Orders from the Quotes and posted them, else it would not have been an easy task to rectify the issue.
Subscribe to my newsletter
Read articles from Doufu directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Doufu
Doufu
Current project developments on Microsoft platforms such as Business Central, Dynamics 365 Sales, Power Platform and occasionally Python. Used to get my paws dirty on Android and Web development.