{"title":"Upgrading an App by Using ForceSync","url":"https://jonas-paprotka.de/docs/dev-itpro/administration/appmanagement/app-management-updating-with-forcesync/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/appmanagement/app-management-updating-with-forcesync, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/appmanagement/app-management-updating-with-forcesync","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Learn how to synchronize a new app version that includes breaking changes.","date":"2021-06-10","meta":{"topic":"how-to"},"outline":[{"level":1,"title":"Upgrading an App by Using ForceSync","slug":"upgrading-an-app-by-using-forcesync","at":0,"chars":2817},{"level":2,"title":"Overview","slug":"overview","at":163,"chars":1462},{"level":2,"title":"Upgrade an app version using ForceSync","slug":"upgrade-an-app-version-using-forcesync","at":1625,"chars":1057},{"level":2,"title":"Related information","slug":"related-information","at":2682,"chars":135}],"text":"# Upgrading an App by Using ForceSync\nThis article provides guidelines for using ForceSync option to upgrade an app to a version that introduces breaking changes.\n## Overview\nWhen you upgrade an app to a new version, the database is synchronized with any schema changes introduced by the new app version. Under normal operation, if the app introduces any breaking changes, like removing a field or changing its data type, the synchronization will fail, preventing the upgrade. However, the service includes a property called syncMode that you can set to `\"ForceSync\"`, which will apply the breaking changes. If you're familiar with Business Central on-premises, this operation is similar to using the Sync-NAVApp cmdlet<https://learn.microsoft.com/powershell/module/microsoft.dynamics.nav.apps.management/sync-navapp> with `-mode ForceSync` parameter.\nThis property only works with side-by-side upgrades using Microsoft Lifecycle Services<https://lcs.dynamics.com/v2> (LCS). You can't use it for breaking changes in a hotfix pushed from App Management API. So make sure you plan your changes when preparing new minor or major upgrades.\n> IMPORTANT\n> Use this option with caution. When you use the `syncMode = \"ForceSync\"`, it applies breaking changes forcefully, typically deleting the data in the objects that have new schema. It can also break other apps that run on top of your objects. Before using this option in production, test it on both on-premises and online (using Sandboxes). It's also recommended that you export a BACPAC of your production environment from the Business Central admin center before the upgrade.\n## Upgrade an app version using ForceSync\n1. Using the App Management API, upload a new app version as usual.\n See app-management-api#upload-version.\n2. In Microsoft Lifecycle Services<https://lcs.dynamics.com/v2>, create a new deployment that will use new app version.\n3. Using Windows PowerShell, issue PATCH request, like the following example, to change the syncMode property on the app version:\n ```powershell\n $version = 'target_version'\n $url = https://apps.businesscentral.dynamics.com/v1.3/apps/$appID/countries/$country/versions/$version\n $body = @{\n   syncMode = \"ForceSync\"\n }\n\n Invoke-WebRequest -Uri $url -Headers $headers -Body (ConvertTo-Json $body) -Method Patch\n ```\n Replace target_version with the new version of your app, for example, 18.0.23456.21212.\n4. In LCS, upgrade an environment from the old version to the new version. The new app version will be upgraded using ForceSync.\nYou can always switch to the normal sync mode for an app issuing another PATCH request that sets the syncMode to `\"Sync\"`:\n```\n{\n\"syncMode\": \"Sync\"\n}\n```\n## Related information\napp-management-api\nManage Apps in the Business Central Administration Center<../tenant-admin-center-manage-apps>"}