Resolving Sync Error: Specified field does not exist in the database or the configuration key on the field or on Extended Data Type is off
Imagine syncing your Dynamics 365 Finance & Operations solution with the database and suddenly encountering a mysterious error about a missing field called SalesDate_CZ in the ProjInvoiceJour data source. This error can be puzzling — especially since you may not immediately connect it to a configuration key.
In this guide, I’ll explain why this error occurs and walk you through a step-by-step solution to fix it. We’ll cover how to identify the root cause, enable the Trade dates configuration key, enter maintenance mode to make the change, and synchronize your database. By the end, the issue and fix will be clear, along with some best practices to avoid similar sync errors in the future.
Understanding the Sync Error
When attempting to synchronize the database, you might see an error in Visual Studio’s Error List similar to the screenshot below. In our case, the error stated that “Specified field SalesDate_CZ of datasource ProjinvoiceJour does not exist in the database or the configuration key on the field or on Extended DataType used by the field is off.” It also mentioned that a certain views (in our example SAFTGeneralJournalFocusDimensionView and SAFTGeneralJournalView) could not be created as a result. This error essentially means the system expected a field in the database that isn’t there.
Identifying the Root Cause: A not enabled Trade dates Configuration Key
The first thing you naturally do when encountering issues like this is to check if the field exists on the table using AOT (Application Explorer):
After confirming in AOT that the SalesDate_CZ field does indeed exist in the ProjInvoiceJour data source, the next key clue is in the error message itself: “…or the configuration key on the field or on Extended Data Type used by the field is off.” After a bit of investigation, we discovered that this field is governed by the Trade dates configuration key. When that key is disabled, the SalesDate_CZ field is removed from the table and any dependent views. In Dynamics 365 F&O, many optional features and country-specific fields are controlled by configuration keys (also known as license configuration keys). If a configuration key is disabled, any fields or functionality tied to it will be hidden from the data model. Here, SalesDate_CZ is a field that wasn’t found in the database because its configuration key was turned off. The error cascaded to any data entity or view referencing that field, causing the sync to fail. In short, the system was telling us that a feature was switched off, resulting in a missing field and a broken sync.
What are configuration keys? For those less familiar: configuration keys in Dynamics 365 F&O control the activation of optional modules or features at a granular level. They can enable or disable functionality (like fields, forms, or entire modules) without needing code changes. In this scenario, Trade dates is a configuration key that controls certain date fields on sales transactions (particularly relevant for certain country localizations). When it’s off, the system behaves as if those fields don’t exist – which explains our error. This mechanism is useful to keep the system streamlined to your licensed features, but it can sometimes lead to “hidden” dependencies causing errors if a needed key is off.
How did we confirm it was off? We navigated to the License configuration form in the system (under System Administration > Setup > License configuration). There, we found that the checkbox for Trade dates was unchecked, indicating the feature was disabled.
At this point, we had identified the root cause: the Trade dates config key was disabled, thereby removing the SalesDate_CZ field and causing our database sync error. The fix would be to turn that key on – but doing so isn’t possible unless the system is in the maintenance mode. Let’s go through the solution step by step.
Step by Step Solution
To resolve the error, we need to enable the Trade dates configuration key and refresh the database schema. However, changing configuration keys requires a bit of preparation (maintenance mode) to allow the system to accept the change. Below is a practical step-by-step guide:
1️⃣ Enter Maintenance Mode: By design, Dynamics 365 F&O protects certain system changes by requiring maintenance mode to be turned on. In maintenance mode, only admins can access the system, and it allows changes to config keys or financial dimensions. If you open the License configuration form without maintenance mode, you’ll see a warning that the form is read-only and that maintenance mode must be enabled to make changes. This is a safety feature – configuration keys can only be toggled while the system is in maintenance mode. How you enable maintenance mode depends on your environment. You can find more information in my previous blog post: Enable maintenance mode
2️⃣ Enable the Trade dates Configuration Key: Now that maintenance mode is on, navigate to System Administration > Setup > License configuration. This form lists all the configurable keys. Locate Trade dates in the list under the relevant module group – Trade. Once you find Trade dates, tick the checkbox next to it to turn it on.
3️⃣ Synchronize Database: After enabling the key, the SalesDate_CZ field is conceptually now active in the system’s metadata. Next step is to synchronize database so that any missing columns or changes are applied.
You should see a success message indicating the database sync completed without errors. For Microsoft-managed Tier 2+ environments, a full sync may run automatically when you exit maintenance mode.
4️⃣ Disable maintenance mode – Remember to take the system out of maintenance mode. You can follow the same blog post: Disable maintenance mode
Final Thoughts and Best Practices
Encountering sync errors related to configuration keys, such as the missing SalesDate_CZ field, highlights the critical importance of carefully managing feature toggles and license configurations in Dynamics 365 F&O. Before enabling or disabling configuration keys, always conduct thorough testing in non-production environments (such as Dev or UAT). This approach helps you identify hidden dependencies or side effects early, preventing unexpected disruptions in production.
Plan maintenance windows thoughtfully—putting the environment into maintenance mode during off-peak hours ensures minimal impact on users. Always take database backups before significant configuration changes, providing a reliable rollback option if things don’t go as planned.
Information Technology Administrator @ Samco Machinery | Microsoft Certified: Dynamics 365 Fundamentals (ERP)
1moThanks for sharing, Luka