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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Failure Sync-NAVApp for Business Foundation in Step 14 of BC14 to BC25 Upgrade

(5) ShareShare
ReportReport
Posted on by 12
I am trying to upgrade BC14 to BC25 and in step 14 when using the command
 
Sync-NAVApp -ServerInstance BC -Name "Business Foundation" -Version 25.15.44303.0 -Mode Development -Verbose
 
I have tried -Mode ForceSync, used the SQL Profiler to find out at which table it occurs, used -CommitPerTable. Nothing has revealed any more information. I am using a customer and not a partner license. 
 
Thank you for your help.
 
I get the following error:
Object reference not set to an instance of an object.
 
The event log of the container shows the following stack trace:
ExceptionStackTrace:
   at Microsoft.Dynamics.Nav.Runtime.Apps.V2Schema.SyncMoveSymbolHelper.IsMovedFromISVToMicrosft(NavAppSyncBundle appBundle, NavAppRuntimeMetadata targetApp, Me                                            etaTable table, IAppSyncSnapshotRepository snapshotRepository, AppSyncSnapshotRec                                            cord& originalSnapshot)
   at Microsoft.Dynamics.Nav.Runtime.Apps.SyncTableBundler.CreateTableBundles(NavAppSyncBundle appbundle, IEnumerable`1 targetAppTables, IEnumerable`1 snapshots                                            sForApp, IEnumerable`1 filters, Boolean allowIdFallback, IReadOnlyList`1 migratio                                            onTargets, Dictionary`2 nonstructuralTables, IAppSyncSnapshotRepository snapshotR                                            Repository, IEnumerable`1 extensionSnapshots)
   at Microsoft.Dynamics.Nav.Runtime.Apps.SyncTableBundler.CreateTableBundles(NavAppSyncBundle appSyncBundle, IEnumerable`1 targetAppTables, IEnumerable`1 snaps                                            shotsForApp, IEnumerable`1 extensionSnapshots, IEnumerable`1 filters, IReadOnlyLi                                            ist`1 migrationTargets, Dictionary`2 nonstructuralTables, IAppSyncSnapshotReposit                                            tory snapshotRepository)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.SynchronizeTenantDatabaseForAppSyncInternal(NavAppSyncBundle bundle, NavSqlConnectionScope tenantDatabas                                            seScope)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.SynchronizeTenantDatabaseForAppSyncInternal(NavAppSyncBundle bundle)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.SynchronizeTenantDatabaseForAppSyncWithSession(NavAppSyncBundle bundle, NavSession session, Boolean newS                                            SystemSession)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.<>c__DisplayClass90_0.<SynchronizeTenantDatabaseForAppSync>b__0(NavTenant tenant, NavSession systemSessi                                            ion)
   at Microsoft.Dynamics.Nav.Runtime.NavTenant.<>c__DisplayClass231_0.<Microsoft.Dynamics.Nav.Runtime.ITenantSessionHandler.RunTenantActionInSystemSession>b__0(                                            (NavTenant tenant, NavSession session)
   at Microsoft.Dynamics.Nav.Runtime.NavTenant.Microsoft.Dynamics.Nav.Runtime.ITenantSessionHandler.RunTenantActionInSystemSessionAsync(Func`3 action, Boolean t                                            throwExceptions, Boolean useCurrentCulture, Boolean allowAppsDisabledMode, Langua                                            ageSetting language, NavCancellationToken cancellationToken)
   at Microsoft.Dynamics.Nav.Runtime.NavTenant.Microsoft.Dynamics.Nav.Runtime.ITenantSessionHandler.RunTenantActionInSystemSession(Action`2 action, Boolean thro                                            owExceptions, Boolean useCurrentCulture, Boolean allowAppsDisabledMode, LanguageS                                            Setting language, NavCancellationToken cancellationToken)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.SynchronizeTenantDatabaseForAppSync(NavAppSyncBundle bundle)
CallerStackTrace:
   at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.SynchronizeTenantDatabaseForAppSync(NavAppSyncBundle bundle)
   at Microsoft.Dynamics.Nav.Runtime.NavDatabase.SynchronizeTenantDatabaseForApp(NavAppSyncBundle bundle)
   at Microsoft.Dynamics.Nav.Runtime.NavAppSyncManagementTasks.SynchronizeTenantDatabaseForApp(NavAppSyncBundle bundle)
   at Microsoft.Dynamics.Nav.Runtime.NavAppSyncManagementTasks.SyncNavAppInternal(NavAppSyncBundle bundle)
   at Microsoft.Dynamics.Nav.Runtime.NavAppSyncManagementTasks.SyncNavApp(SyncNavAppArguments args)
   at Microsoft.Dynamics.Nav.Runtime.NavTenantDatabaseManagementTasks.SyncNavApp(SyncNavAppArguments syncNavAppArguments)
   at Microsoft.Dynamics.Nav.Service.NSAdminService.<>c__DisplayClass141_0.<Microsoft.BusinessCentral.AdminApi.ITenantDatabaseManagementService.SyncNavApp>b__0(                                            ()
   at Microsoft.Dynamics.Nav.Runtime.NavSqlTransientErrorHelper.<>c__DisplayClass2_0`1.<RetryOperationWithTransientError>b__0()
   at Microsoft.Dynamics.Nav.Runtime.NavSqlTransientErrorHelper.InternalRetryOperationWithTransientError[T](Action operation, Int32 maxRetryCount, Int32 retryIn                                            ntervalInSeconds, String callerName, String additionaInfo, Boolean expectedType) 
   at Microsoft.Dynamics.Nav.Runtime.NavSqlTransientErrorHelper.RetryOperationWithTransientError[T](Func`1 operation, Int32 maxRetryCount, Int32 retryIntervalIn                                            nSeconds, String caller, String additionalContext)
   at Microsoft.Dynamics.Nav.Service.NSAdminService.Microsoft.BusinessCentral.AdminApi.ITenantDatabaseManagementService.SyncNavApp(SyncNavAppArguments syncNavAp                                            ppArguments)
   at InvokeStub_ITenantDatabaseManagementService.SyncNavApp(Object, Span`1)    
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)        
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)      
   at CoreWCF.Dispatcher.InvokerUtil.CriticalHelper.<>c__DisplayClass3_0.<GenerateInvokeDelegate>b__0(Object target, Object[] inputs, Object[] outputs)
   at CoreWCF.Dispatcher.SyncMethodInvoker.InvokeAsync(Object instance, Object[] inputs)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass5_0.<<Create>b__0>d.MoveNext()
   at _Diag_.Net._Async_Internals_()
   at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass5_0.<Create>b__0(ServiceOperationContext context)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.StartSamplingProfilingCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOpera                                            ation)
   at _Diag_.Net._Async_Internals_()
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.StartSamplingProfilingCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOpera                                            ation)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass26_0`1.<Combine>b__1(ServiceOperationContext contexts)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.AddSessionToThreadSchedulerCombinator[T](ServiceOperationContext context, ServiceOperation`1 inner                                            rOperation)
   at _Diag_.Net._Async_Internals_()
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.AddSessionToThreadSchedulerCombinator[T](ServiceOperationContext context, ServiceOperation`1 inner                                            rOperation)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass26_0`1.<Combine>b__1(ServiceOperationContext contexts)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.ErrorMappingCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOperation, Bool                                            lean useCoreWcfFaultException)
   at _Diag_.Net._Async_Internals_()
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.ErrorMappingCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOperation, Bool                                            lean useCoreWcfFaultException)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass1_0`1.<Create>b__0(ServiceOperationContext context, ServiceOperation`1 operation)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass26_0`1.<Combine>b__1(ServiceOperationContext contexts)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.PartnerTelemetryPermissionErrorCombinator[T](ServiceOperationContext context, ServiceOperation`1 i                                            innerOperation)
   at _Diag_.Net._Async_Internals_()
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.PartnerTelemetryPermissionErrorCombinator[T](ServiceOperationContext context, ServiceOperation`1 i                                            innerOperation)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass26_0`1.<Combine>b__1(ServiceOperationContext contexts)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.PushPopCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOperation, Boolean u                                            useCoreWcfFaultException)
   at _Diag_.Net._Async_Internals_()
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.PushPopCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOperation, Boolean u                                            useCoreWcfFaultException)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass1_0`1.<Create>b__2(ServiceOperationContext context, ServiceOperation`1 operation)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass26_0`1.<Combine>b__1(ServiceOperationContext contexts)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.VerifyAdminCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOperation, Boole                                            ean useCoreWcfFaultException)
   at _Diag_.Net._Async_Internals_()
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.VerifyAdminCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOperation, Boole                                            ean useCoreWcfFaultException)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass1_0`1.<Create>b__6(ServiceOperationContext context, ServiceOperation`1 operation)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass26_0`1.<Combine>b__1(ServiceOperationContext contexts)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.TelemetryCombinator[T](Category telemetryCategory, Verbosity telemetryVerbosity, ServiceOperationC                                            Context context, ServiceOperation`1 innerOperation)
   at _Diag_.Net._Async_Internals_()
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.TelemetryCombinator[T](Category telemetryCategory, Verbosity telemetryVerbosity, ServiceOperationC                                            Context context, ServiceOperation`1 innerOperation)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass1_0`1.<Create>b__7(ServiceOperationContext context, ServiceOperation`1 innerOpera                                            ation)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass26_0`1.<Combine>b__1(ServiceOperationContext contexts)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationTracer.TraceScopeCombinator[T](Category telemetryCategory, ServiceOperationContext context, ServiceOperatio                                            on`1 innerOperation)
   at _Diag_.Net._Async_Internals_()
   at Microsoft.Dynamics.Nav.Service.ServiceOperationTracer.TraceScopeCombinator[T](Category telemetryCategory, ServiceOperationContext context, ServiceOperatio                                            on`1 innerOperation)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass1_0`1.<Create>b__8(ServiceOperationContext context, ServiceOperation`1 innerOpera                                            ation)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass26_0`1.<Combine>b__1(ServiceOperationContext contexts)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass7_0`1.<<PerformanceCounterCombinator>b__0>d.MoveNext()
   at _Diag_.Net._Async_Internals_()
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass7_0`1.<PerformanceCounterCombinator>b__0()
   at Microsoft.Dynamics.Nav.Runtime.NavPerformanceCounterSetter.UpdatePerformanceCountersWithAverageServiceOperationAction(Func`1 action, NavSession session)  
   at _Diag_.Net._Async_Internals_()
   at Microsoft.Dynamics.Nav.Runtime.NavPerformanceCounterSetter.UpdatePerformanceCountersWithAverageServiceOperationAction(Func`1 action, NavSession session)  
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.PerformanceCounterCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOperation                                            n)
   at _Diag_.Net._Async_Internals_()
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.PerformanceCounterCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOperation                                            n)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass26_0`1.<Combine>b__1(ServiceOperationContext contexts)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.InitClientTelemetryIdsCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOpera                                            ation)
   at _Diag_.Net._Async_Internals_()
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.InitClientTelemetryIdsCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOpera                                            ation)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass26_0`1.<Combine>b__1(ServiceOperationContext contexts)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.TlsClearCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOperation)
   at _Diag_.Net._Async_Internals_()
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.TlsClearCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOperation)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass26_0`1.<Combine>b__1(ServiceOperationContext contexts)
   at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.InvokeAsync(Object instance, Object[] inputs)
   at _Diag_.Net._Async_Internals_()
   at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.InvokeAsync(Object instance, Object[] inputs)
   at CoreWCF.Dispatcher.DispatchOperationRuntime.<>c__DisplayClass71_0.<<InvokeAsync>b__0>d.MoveNext()
   at _Diag_.Net._Async_Internals_()
   at CoreWCF.Dispatcher.DispatchOperationRuntime.<>c__DisplayClass71_0.<InvokeAsync>b__0()
   at CoreWCF.Dispatcher.SecurityImpersonationBehavior.RunImpersonated[T](MessageRpc rpc, Func`1 func)
   at CoreWCF.Dispatcher.DispatchOperationRuntime.InvokeAsync(MessageRpc rpc)   
   at _Diag_.Net._Async_Internals_()
   at CoreWCF.Dispatcher.DispatchOperationRuntime.InvokeAsync(MessageRpc rpc)   
   at CoreWCF.Dispatcher.ImmutableDispatchRuntime.ProcessMessageAsync(MessageRpc rpc)
   at _Diag_.Net._Async_Internals_()
I have the same question (0)
  • Suggested answer
    OussamaSabbouh Profile Picture
    18,440 Super User 2026 Season 1 on at
    Hello ,
     
    That stack trace usually shows up when the service tier is trying to do a schema sync for a Microsoft system app and it can’t resolve metadata about “moved” tables (ISV → Microsoft) and you’re running with a customer license. In practice the fix is: load a partner/dev license for the upgrade steps, at least for the stages where you publish/sync Microsoft apps (like Business Foundation), then switch back to the customer license afterwards. Also make sure you’re not using -Mode Development for an upgrade run unless the guide explicitly says so—typically you publish the apps, run Sync-NAVApp in normal sync mode, then run the data upgrade. If you’re doing this in a container, confirm the license is actually loaded in the NST (upload license + restart service) before running Sync-NAVApp, otherwise it looks like it “works” but still behaves like it’s unlicensed for those system ranges.
     
    Regards,
    Oussama Sabbouh
  • OF-04020022-0 Profile Picture
    12 on at
    Dear Oussama, 
     
    Thank you for your explanation. I can see in the source code for Business Foundation e.g. 
    table 230 "Source Code"
    {
        Caption = 'Source Code';
        LookupPageID = "Source Codes";
        DataClassification = CustomerContent;
        MovedFrom = '437dbf0e-84ff-417a-965d-ed2bb9650972';
     
    If he is trying to resolve the metadata for this original table in the Microsoft Base Application, I am not sure if he can find it. Because MS Base Application is published but not synced yet, since according to the upgrade manual, this should happen after the Sync for the Business Foundation App. Or am I wrong here? 
     
     
    Kind Regards,
    Oliver
  • Suggested answer
    YUN ZHU Profile Picture
    102,540 Super User 2026 Season 1 on at
  • JL-25070757-0 Profile Picture
    2 on at
    Hello everyone.

    We're getting the exact same error, migrating from BC14.12 to BC25.0.

    In our case, we're using a partner license. Any ideas on where the problem might be coming from?

    Thanks.
  • OF-04020022-0 Profile Picture
    12 on at
    @JL-25070757-0: We could not solve the issue independent of the license. Our solution was to disregard the suggested Microsoft upgrade path and implement our own custom sql migration to move the relevant data from the BC14 database to a clean BC25 database. If you are interested I can share some more information on this approach.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 690 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 545 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 304 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans