Recently, in our product, we enabled support for the new “Item References” in Business Central. Basically meaning: when upgrading to the new version of our product, we wanted to:
-Make sure our code supported the new “Item Reference” table in stead of the old “Item Cross Reference” table
-Automatically enable the “Item Reference” feature” (necessary, because when your code depends on this new feature, it has to be enabled ;-)).
-Automatically trigger the data upgrade (which basically transfers all data from one table to the other)
Obviously, this is all done using an upgrade codeunit. And this made me realize that there are some things that might not be too obvious to take into account when doing things like this