I'm trying to publish a new 1.0.0.2 version to a previously released 1.0.0.0 extension (which has been uninstalled).
I use this script in Dynamics Nav Administration shell:
...
Publish-NAVApp -ServerInstance $ServiceInstance -Path "<app path>.app" -SkipVerification -PassThru
Install-NAVApp -ServerInstance $ServiceInstance -Name '<app name>'
This fails because 'Record Contact/Customer/Vendor' does not contain a definition for 50200 'Custom field'.
This custom field 50200 has been added using the Navision Development environment (it is visible and when I run the table there, it does contain data).
The setup is a solution of which one part has been developed in the development environment and another part is an extension (those two are functionally different).
They run on a BC11 service.
After some googling, I found this:
https://tabrezblog.azurewebsites.net/post/2020/04/01/publish-navapp-extension-compilation-failed-during-publishing-extension-in-on-on-premises-business-central-production-environment
So I run this finsql command:
cd "C:\Program Files (x86)\Microsoft Dynamics NAV\110\RoleTailored Client"
finsql.exe Command=generatesymbolreference, Database="<Database>", Servername="<Database Name>\<Database Instance>"
I get the following output in the error log under ...\RoleTailored Client:
"[22926090] The Object Metadata table cannot be changed because it is locked by another user. This can be caused by one of the following tasks: * Objects are being compiled. * Table schema is synchronizing. * Objects are being imported. Wait until the user is finished and then try again."
The above happens even when I restart both services (the client and webservice service).
At some point, running the finsql command seemed to be succesful ([0] [04/01/21 14:35:04] The command completed successfully in '348' seconds.) but even then, I was unable to publish the app because of those 'Custom Field's not being defined in those tables.
I really need to publish this app.
Any help would be greatly appreciated.