microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
722 stars 242 forks source link

Removal of table extensions #7646

Closed brunomenezes66 closed 5 months ago

brunomenezes66 commented 5 months ago

I am not able to remove any fields from a previously created table extension, ou even the full table extension.

Any destructive changes or removal of fields in a table extension results in the error UnprocessableEntity caused by Object reference not set to an instance of an object when doing a Force schema sync. Not even having the fields previously marked as obsolete allows for their deletion. This results in a table extension beeing abandoned and the object forever lost in our solution. The only way I found to remove a table extension or its fields is by doing a Recreate schema synchronization.

I did not find any information online about deleting table extensions and I do not know if this is intended behaviour or maybe a bug introduced because of having another table extension published for the same table.

We are currently running version 23.0.12831.0 OnPrem and I think this behaviour was introduced since the consolidation of all table extensions into a single SQL table.

brunomenezes66 commented 5 months ago

Update with some more insights I found. I was able to finally remove the table extension, with some workarounds. The error Object reference not set to an instance of an object seems to happen when deleting the last field of a table extension. I was able to overcome this by marking the last field as a flowfield, which removes it from the table, after that I could just remove the table extension without errors.

kalberes commented 5 months ago

Have you tried a later server version? Do you have clear repro? If yes please open a new issue with a proper repro.

brunosearaCPC commented 5 months ago

Unable to reproduce in the latest OnPrem version as of today (23.4.15643.15715).