web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Business Central forum

BC not launchable anymore after changing SQL Data Type to Variant

(0) ShareShare
ReportReport
Posted on by 5

Hello all,

I have a Problem. When I change the Field "No." of Table 27 - Item from Code to Variant, I can no more restart the Application Server.

Trying to start the server instance results in the following exception stacktrace (extracted from the server's event view):


Server instance: BC130
Category: Runtime
ClientSessionId: 00000000-0000-0000-0000-000000000000
ClientActivityId: 00000000-0000-0000-0000-000000000000
ServerSessionUniqueId: 00000000-0000-0000-0000-000000000000
ServerActivityId: 71662aa0-c029-4208-a156-2ee8ffba991e
EventTime: 06/19/2019 13:26:07
Message (NavNotSupportedException): RootException: NavNotSupportedException
Exception of type 'Microsoft.Dynamics.Nav.Types.Exceptions.NavNotSupportedException' was thrown.
ExceptionStackTrace:
at Microsoft.Dynamics.Nav.Runtime.NCLMetaQuery.<>c__DisplayClass59_0.b__2(NCLMetaQueryDefinition subQueryBeingCreated)
at Microsoft.Dynamics.Nav.Runtime.NCLMetaQueryDefinition..ctor(NCLMetaQueryDataItem parentDataItem, Int32 topRows, Func2 dataItemsCreator, Func2 orderBysCreator)
at Microsoft.Dynamics.Nav.Runtime.NCLMetaQuery.<>c__DisplayClass59_0.b__0(NCLMetaQueryDataItem dataItemBeingCreated)
at Microsoft.Dynamics.Nav.Runtime.NCLMetaQueryDataItem..ctor(NCLMetaQueryDefinition parentQueryDefinition, DataItemLinkType dataItemLinkType, Func2 subQueryCreator, String name, Func2 queryColumnsCreator, Func2 dataItemLinksCreator, Int32 appGroup) at Microsoft.Dynamics.Nav.Runtime.NCLMetaQuery.CreateSubQueryForFlowFieldCalculation(NCLMetaQueryDataItem baseDataItem, MetaQueryColumn flowFieldColumn, Int32 nextColumnId) at Microsoft.Dynamics.Nav.Runtime.NCLMetaQuery.CreateDataItemsFromDesignMetadata(NCLMetaQueryDefinition parentQueryDefinition, MetaQuery metaQuery, Boolean allowExpressionEvaluation, Boolean& tableFilterHasVariables) at Microsoft.Dynamics.Nav.Runtime.NCLMetaQuery.<>c__DisplayClass62_1.<ParseMetadata>b__0(NCLMetaQueryDefinition queryDefinitionBeingCreated) at Microsoft.Dynamics.Nav.Runtime.NCLMetaQueryDefinition..ctor(NCLMetaQueryDataItem parentDataItem, Int32 topRows, Func2 dataItemsCreator, Func2 orderBysCreator) at Microsoft.Dynamics.Nav.Runtime.NCLMetaQuery.ParseMetadata(MetaQuery metaQuery, Boolean allowExpressionEvaluation) at Microsoft.Dynamics.Nav.Runtime.NCLMetaQuery.LoadMetadata() at Microsoft.Dynamics.Nav.Runtime.NCLMetaApplicationObject.Populate() at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.TryToEagerLoadFreshAppObject(NCLMetaApplicationObject baseObject, ApplicationObjectId objectId, Int32 appGroupId) CallerStackTrace: at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.TryToEagerLoadFreshAppObject(NCLMetaApplicationObject baseObject, ApplicationObjectId objectId, Int32 appGroupId) at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.EnsureAppObjectsTrackedByCacheAreLoaded(ApplicationObjectId objectId, IEnumerable1 affectedAppGroupIds, Boolean markStaleAndOverwriteIfPresent)
at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.SetAppObjectStaleInternal(ApplicationObjectId objectId, IEnumerable1 affectedAppGroupIds) at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.TraverseGraphCheckingForOtherStaleObjectsUntilAllAreMarked() at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.SetObjectsStale(IEnumerable1 changedObjectIds)
at Microsoft.Dynamics.Nav.EventSubscription.NavEventSubscriptionMetadata.RebindEventSubscriptionsIfNeeded(Func1 staleFunc) at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.Database_ObjectMetadataChanged(Object sender, NavTrackingEventArgs eventArgs) at System.EventHandler1.Invoke(Object sender, TEventArgs e)
at Microsoft.Dynamics.Nav.Runtime.NavDatabase.RaiseTypeSpecificTrackingEvent(EventHandler1 eventHandler, List1 trackingObjects, ObjectTrackingChangeType changeType)
at Microsoft.Dynamics.Nav.Runtime.NavDatabase.HandleTrackingEvent(List`1 trackingObjects)
at Microsoft.Dynamics.Nav.Runtime.NavDatabaseChangeListener.HandleTrackingEvent()
at Microsoft.Dynamics.Nav.Runtime.NavDatabaseChangeListener.ForceHandleTrackingEvent()
at Microsoft.Dynamics.Nav.Runtime.NavCSideServiceTasks.SynchronizeTables(String tenantId, Int32[] tableIds, Boolean force)
at SyncInvokeSynchronizeTables(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.ErrorMappingCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass24_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.PushPopCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass24_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.TelemetryCombinator(Category telemetryCategory, Verbosity telemetryVerbosity, ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass6_0.b__0(ServiceOperation operation, NSServiceBase instance, MethodBase syncMethodLocal, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass24_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationTracer.TraceScopeCombinator(Category telemetryCategory, ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass24_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass9_0.b__0()
at Microsoft.Dynamics.Nav.Runtime.NavPerformanceCounterSetter.UpdatePerformanceCountersWithAverageServiceOperationDuration(Stopwatch stopWatch, Action action)
at Microsoft.Dynamics.Nav.Runtime.NavPerformanceCounterSetter.UpdatePerformanceCountersWithAverageServiceOperationAction(Action action, NavSession session)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.PerformanceCounterCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass24_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.InitClientTelemetryIdsCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass24_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.TlsClearCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass24_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
at System.ServiceModel.Dispatcher.MessageRpc.Wrapper.Resume(Boolean& alreadyResumedNoLock)
at System.ServiceModel.Dispatcher.ThreadBehavior.ResumeProcessing(IResumeMessageRpc resume)
at Microsoft.Dynamics.Nav.Runtime.NavSynchronizationContext.<>c__DisplayClass1_0.b__0(Object state)
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.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()

Changing the SQL Data Type from Code to Variant is very useful to our customer, since the ordering of the column is different. This worked in NAV.

Does anyone know, what I can do?

Categories:
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    In this way you break N things inside D365BC. It's absolutely a worst practice to change the data type of a primary key of one of the master tables.

    For ordering you can create a new field of type Variant if needed and automatically populate it in OnInsert of an Item, but don't change the primary key data type please.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans