[Standard Option Field Extension] Metadata error
Hello,
I am working on a LS Retail extension for Business Central and I have to integrate my printers with NAV. In this respect, I have to extend the field 'Printer' (80) from table 'POS Hardware Profile' (99008900). I changed the properties of field:
- Extensible: YES
- EnumTypeId: 50004
- EnumTypeName: PrinterEnum
Then I made an enumextension in my app extension:
enumextension 45009786 "My Printer" extends PrinterEnum
{
value(4; MyPrinter)
{
Caption = 'My Printer';
}
}
My ID Range is from 45009785 to 45009794.
I published the extension and it worked until I restarted the server instance. After instance has stopped, it won't start and in event viewer I found these errors:
Server instance: MY_SERVER_INSTANCE Category: Extensions ClientSessionId: 00000000-0000-0000-0000-000000000000 ClientActivityId: MY_CLIENT_ID ServerSessionUniqueId: 00000000-0000-0000-0000-000000000000 ServerActivityId: MY_SERVER_ACTIVITY_ID EventTime: 08/05/2019 09:20:23 Message Fatal error during metadata load -- Type:Enum; Id:50004; MetadataGroup:0; MetadataLoaded:False; CLRLoaded:False; ThreadGroup:2 ProcessId: 368 Tag: 00007YQ ThreadId: 12 CounterInformation:
Server instance: MY_SERVER_INSTANCE Category: Extensions ClientSessionId: 00000000-0000-0000-0000-000000000000 ClientActivityId: MY_CLIENT_ID ServerSessionUniqueId: 00000000-0000-0000-0000-000000000000 ServerActivityId: MY_SERVER_ACTIVITY_ID EventTime: 08/05/2019 09:20:23 Message (NavNCLMetadataObjectNotFoundException): RootException: NavNCLMetadataObjectNotFoundException Object of type Enum with ID 50004 could not be found. ExceptionStackTrace: at Microsoft.Dynamics.Nav.Runtime.NCLMetaEnum.LoadMetadata() at Microsoft.Dynamics.Nav.Runtime.NCLMetaApplicationObject.Populate() at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.GetMetaApplicationObjectInternal(ApplicationObjectId appObjectId, Boolean requireCompiled, Boolean onlySearchCache, Int32 appGroupId) CallerStackTrace: at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.GetMetaApplicationObjectInternal(ApplicationObjectId appObjectId, Boolean requireCompiled, Boolean onlySearchCache, Int32 appGroupId) at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.InitializeModifiedBaseObject(NavAppGroup appGroup, NavAppGroupObjectMetadataSummary modifiedSummary) at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.InitializeModifiedBaseObjects(NavAppGroup appGroup, InitializeAppGroupProfilerSession profilerSession, IReadOnlyList`1 baseObjectsModifiedBySomething) at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.InitializeAppGroup(NavAppGroup appGroup) at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.InitializeAppGroup(NavAppGroup appGroup) at Microsoft.Dynamics.Nav.Runtime.Apps.NavAppGroupUpdater.UpdateGroupForChangedTenant(NavTenant tenant) at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.InitializeAppsForTenant(NavTenant tenant) at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.InitializeTenant(NavTenant tenant, NavTenantSettings tenantSettings, Boolean overwriteTenantIdInDatabase, Boolean verifyDatabaseConnection, Boolean ensureDatabaseExclusiveState) at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.AddTenant(NavTenantMountingParameters mountingParameters) at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.MountDefaultTenant(String databaseServerName, String databaseName, String databaseUserName, ProtectedDatabasePassword databasePassword, EncryptionProvider encryptionProvider, AzureKeyVaultSettings azureKeyVaultSettings, Boolean verifyServerInstanceKey) at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.AddSingleLegacyTenant(String databaseServerName, String databaseName, String databaseUserName, ProtectedDatabasePassword databasePassword, EncryptionProvider encryptionProvider, AzureKeyVaultSettings azureKeyVaultSettings) at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.ConfigureTenants(ServerUserSettings settings, String encryptionKey) at Microsoft.Dynamics.Nav.Runtime.NavTaskFactory.<>c__DisplayClass11_0.
b__0() at System.Threading.Tasks.Task.Execute() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart(Object obj) ProcessId: 368 Tag: 00007YR ThreadId: 12 CounterInformation:
Server instance: MY_SERVER_INSTANCE Category: Extensions ClientSessionId: 00000000-0000-0000-0000-000000000000 ClientActivityId: MY_CLIENT_ID ServerSessionUniqueId: 00000000-0000-0000-0000-000000000000 ServerActivityId: MY_SERVER_ACTIVITY_ID EventTime: 08/05/2019 09:20:23 Message (NavNCLMetadataObjectNotFoundException): This message had personal data removed. The original may still be in transient telemetry. Find it using the transientTelemetryId. RootException: NavNCLMetadataObjectNotFoundException Message not shown because the NavBaseException(string, Exception, bool) constructor was used. ExceptionStackTrace: at Microsoft.Dynamics.Nav.Runtime.NCLMetaEnum.LoadMetadata() at Microsoft.Dynamics.Nav.Runtime.NCLMetaApplicationObject.Populate() at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.GetMetaApplicationObjectInternal(ApplicationObjectId appObjectId, Boolean requireCompiled, Boolean onlySearchCache, Int32 appGroupId) CallerStackTrace: at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.GetMetaApplicationObjectInternal(ApplicationObjectId appObjectId, Boolean requireCompiled, Boolean onlySearchCache, Int32 appGroupId) at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.InitializeModifiedBaseObject(NavAppGroup appGroup, NavAppGroupObjectMetadataSummary modifiedSummary) at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.InitializeModifiedBaseObjects(NavAppGroup appGroup, InitializeAppGroupProfilerSession profilerSession, IReadOnlyList`1 baseObjectsModifiedBySomething) at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.InitializeAppGroup(NavAppGroup appGroup) at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.InitializeAppGroup(NavAppGroup appGroup) at Microsoft.Dynamics.Nav.Runtime.Apps.NavAppGroupUpdater.UpdateGroupForChangedTenant(NavTenant tenant) at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.InitializeAppsForTenant(NavTenant tenant) at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.InitializeTenant(NavTenant tenant, NavTenantSettings tenantSettings, Boolean overwriteTenantIdInDatabase, Boolean verifyDatabaseConnection, Boolean ensureDatabaseExclusiveState) at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.AddTenant(NavTenantMountingParameters mountingParameters) at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.MountDefaultTenant(String databaseServerName, String databaseName, String databaseUserName, ProtectedDatabasePassword databasePassword, EncryptionProvider encryptionProvider, AzureKeyVaultSettings azureKeyVaultSettings, Boolean verifyServerInstanceKey) at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.AddSingleLegacyTenant(String databaseServerName, String databaseName, String databaseUserName, ProtectedDatabasePassword databasePassword, EncryptionProvider encryptionProvider, AzureKeyVaultSettings azureKeyVaultSettings) at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.ConfigureTenants(ServerUserSettings settings, String encryptionKey) at Microsoft.Dynamics.Nav.Runtime.NavTaskFactory.<>c__DisplayClass11_0.
b__0() at System.Threading.Tasks.Task.Execute() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart(Object obj) ProcessId: 368 Tag: 00007YR ThreadId: 12 CounterInformation:
Current solution:
- Delete all entries from NAV App tables and publish again the extension - and do not restart the instance
- Recompile all objects and generate symbols - it does not always start, but sometimes it works
How can I generate the enum for standard option field? (somehow in the range of localization I don't have this errors and I extended standard option fields)
Thanks in advance!
Hello,
why this ticket was closed ? is it solved in next version/cu ? (i have the same error/behaviour, with BC 14 CU 2 ...)
Nobody tried to give their opinion. Why would I keep it open? I modified the field in standard table.
@grosugeorge we try our best to reply to all issues, but due to competing priorities, there might be periods were the time between when an issue is submitted and when we reply to it increases. If an issue is closed by the person that opened it, we consider that it was resolved. On top of all this, for issues concerning older releases of the product (13.x and older), we advise that you open a support case or file a bug in Collaborate.
so, can you reopen your ticket ? or you prefer i create a new ticket ?
@griotteau can you please try to see if it repros on the latest preview https://freddysblog.com/2019/07/31/preview-of-dynamics-365-business-central-2019-release-wave-2/ ?
I am closing this issue because it appears that it has been resolved. Please open a new issue if you believe this has not been resolved and reference the current issue.