Unsupported field change
Hi,
We have created a package and published later we have changed few field names in tables and again created a new package and publishing it but it is giving the below error:

Please suggest us.
Thanks & Regards Varun Reddy
Hello,
Are you trying to develop an updated version of the first app? If so, renaming fields is not supported. Schema changes between versions must be backwards compatible from one version to the next.
Can you explain your scenario in a bit more detail so I can see if you are hitting an actual issue?
Thanks, Chris
Hi Chris,
We have an initial version of our extensions2.0 app already published. now we have changed few fields names as we have added prefix according to Microsoft guidelines for field names and after that we tried to publish the package in august update again the we are getting the error.
Please let us know if this is what you are looking for.
Let me dig in with a few specific questions:
- What version is the initial version you already have published?
- What version is the one you are trying to create & publish now?
- What process are you trying to use to publish it (VS Code? PowerShell?)
- Do you intend for there to be an upgrade path between the two versions?
We do have a new schema sync process that will make it impossible to rename fields from one version to the next (e.g. 1.0 -> 2.0). This is because some of our new database deployment modes require that schema be backwards compatible to allow multiple versions to coexist in the same tenant database.
Hi, Initial Version is 1.0.0.0 New version is 1.0.0.1 We are using VS Code to publish yes we think there should be an upgrade toll or something so that this error will not occur.
Please let me know if any queries.
Here is the pattern for development:
-
If you are simply developing something but are not releasing it yet, we recommend not changing the version. The VS Code workflow will publish each package fresh, blowing away any previous schema & data in the process.
-
Once you have released a version and put it into use, you now need to play by the versioning/compatibility rules for V2 extension sync. At the present time, this means you can only:
- Add fields
- Add keys
The error you are getting suggests you are running into this case. Your 1.0.0.0 app is published and synced to the DB. When you try to publish & sync 1.0.0.1, we detect the lack of backwards compatibility and fail the sync. This part is by design.
To state this all differently:
- If you are still developing the first version of your app (never released), you should stick to the original version. This will let you add/delete/rename things freely until you have finalized your app.
- If you ARE trying to write an upgrade, then what you are doing with field renames is unsupported. You must maintain field name compatibility with your 1.0.0.0 version.
Hi
I'm currently having this same problem when trying to change DataType of field from Code to Integer. There are no references to the field other than it being a primary key and displayed on a page.
As I am still in the process of learning AL with Visual Studio Code this project is just for learning purposes.
I have not changed the version after publishing for the first time but still get the following error:

Any ideas why this is happening?
This probably falls in the same category as the related discussion in https://github.com/Microsoft/AL/issues/1499. To get around this, you need to specify the: "schemaUpdateMode" : "Recreate" in the launch.json file.
Thanks a lot Dennis! I changed it to "Recreate" and it fixed the problem :)