Business Central Error Messages: What They Mean and How Errors Are Handled
business central error messages
Also searched as
- business central error message management
- error handling in business central
- field error in business central
- business central not working
Short answer
Most Business Central errors come from a few AL patterns: TestField and FieldError for missing or invalid field values, Error for rule violations, and permission or locking messages from the platform. Developers can customize them with Error and ErrorInfo, collect many errors at once, or catch them with TryFunction. If the whole service is unreachable, check service health and environment state first.
Applies to: Business Central online and on-premises. ErrorInfo and error collection are available in current versions, check your version for exact availability.
Troubleshoot a Business Central error message
- 1Read the full text, not the first line. The identification fields and values at the end usually say which record is wrong.
- 2Use Copy details in the error dialog if available and note the date, time and user for support or telemetry lookups.
- 3Match the pattern: must have a value (TestField), must be equal to (FieldError), already exists, another user has modified, or you do not have permission.
- 4Open the record named in the message and fix the field or setup, for example a missing posting group or dimension.
- 5For permission messages, check the permission set for the exact table or object named and use the user's effective permissions.
- 6Reproduce with the debugger or the Page Inspector (Ctrl+Alt+F1) to see the table and field behind the message.
- 7If the service itself is down, check Microsoft 365 service health, your environment status in the admin center, and for on-premises the service tier and event log.
- 8If it is a bug in an extension, find the app that raised it from the error call stack and contact its publisher with the details.
The messages you will see most
TestField produces text like: Customer No. must have a value in Sales Header: Document Type=Order, No.=101001. It cannot be zero or empty. FieldError produces: Field must be equal to value in Table: key fields. Both list the primary key so you can find the record.
Other common ones: The record in table X already exists, with identification fields and values (a duplicate key insert), Another user has modified the record after you retrieved it from the database (concurrency), and You do not have the following permissions on TableData (permissions). Each has its own fix, and several are covered on dedicated pages.
How errors are raised and customized in AL
Error shows a message and stops the current transaction, rolling back uncommitted changes. FieldError and TestField build standard texts for a field. Since the ErrorInfo type was introduced, an error can carry a title, message, detailed message, verbosity, a link to the record and actions that the user can click to fix the cause, which is the modern pattern for actionable errors.
To change or add messages, use the error raising procedure in your own code and subscribe to events where the base app exposes them. You cannot edit base app message text directly in an extension, so wrap your validation in your own checks and raise your own ErrorInfo.
procedure CheckCreditLimit(Customer: Record Customer)
var
ErrInfo: ErrorInfo;
begin
if Customer."Credit Limit (LCY)" = 0 then begin
ErrInfo.Title := 'Credit limit missing';
ErrInfo.Message := 'Set a credit limit before posting.';
ErrInfo.RecordId := Customer.RecordId;
ErrInfo.AddNavigationAction('Open customer');
Error(ErrInfo);
end;
end;Collecting errors, TryFunction and Error Message Management
Posting several documents in a batch does not have to stop at the first failure. The Error Messages page (from the Error Message Management codeunit) collects posting errors so the user sees all of them with a link to the offending record. Newer versions also support collecting errors in your own code with the ErrorBehavior attribute and reading them with GetCollectedErrors.
A TryFunction returns false instead of failing, and GetLastErrorText and GetLastErrorCallStack give the reason. Be careful: database writes are not rolled back by a TryFunction on its own in every situation, and calling it across a commit boundary changes behavior. Use it for calls that may legitimately fail, such as an external HTTP call, not to hide real bugs.
Business Central not working today
Start outside the product. For SaaS check the Microsoft 365 admin center service health and Microsoft's status pages, then the Business Central admin center for the environment's state (for example Active, being updated or suspended). A planned update window or a suspended environment explains a lot of can't sign in cases.
If only you are affected, test another browser and clear the cache, check that your license and user state are enabled, and try the direct environment URL. For on-premises, check that the Business Central Server service is running, SQL Server is reachable, the web client IIS site is up and the Windows event log or server debugger has the real error.
Try it here, free
Business Central AL Extension Skeleton Generator
Fill in publisher, prefix and ID range to get app.json, a table extension, a page extension, an event subscriber codeunit and a permission set.
Common pitfalls
- !Fixing only the field named in the message when the real cause is a missing setup record such as a posting group.
- !Wrapping everything in TryFunction, which hides genuine data problems.
- !Assuming a long text is the same error. Always read the identification fields at the end.
- !Committing inside code that may fail, which defeats rollback and leaves partial data.
- !Treating a service-wide outage as a user permission problem and changing permissions unnecessarily.
How an ERP-grounded AI assistant handles this
Error triage is pattern matching plus context. A private assistant connected read-only to your Business Central data can take the pasted message and identification fields, look up the record and its setup, and explain which posting group, dimension or permission is missing, citing the table. It does not change data, a user or administrator makes the fix.
Frequently asked questions
What is the difference between Error and FieldError in AL?
Error raises any message you write and rolls back the transaction. FieldError raises a standard message about a specific field that has an invalid value, including the table and primary key values. TestField checks a value and raises the standard must have a value message when it fails.
How do I show all posting errors instead of only the first?
Use the Error Messages page, which collects errors during batch posting, or in your own AL use the ErrorBehavior attribute to collect errors and read them with GetCollectedErrors. Which options exist depends on your version, so verify in the documentation for the release you run.
Why does Business Central say another user has modified the record?
Someone or something changed the record after you opened it, so your save would overwrite it. Refresh the page and reapply your change. If it happens constantly, a background job or integration is editing the same records.
Business Central is not working today, where do I look first?
Check Microsoft service health and the environment status in the admin center before changing anything. If those are fine, test your own user, license and browser. On-premises, check the service tier, SQL Server and the event log.
Related
Business Central: "Another user has modified the record after you retrieved it"
Business Central uses optimistic concurrency. Every record carries a row version, and a write is rejected if the stored version no longer matches what you read. For users, refresh the page and redo the edit. For developers, read and modify in the same short transaction, use LockTable or the right read isolation, and send an If-Match ETag from API clients.
Error fixFixing "You do not have the following permissions on TableData (table): (permission)" in Business Central AL
This runtime error means the current user's assigned permission sets do not grant the required Insert, Modify, Delete, Read, or Execute right on that specific table. It is most common right after installing or updating a custom AL extension, because Business Central checks object-level permissions even for tables an extension owns.
Error fixBusiness Central: "Posting Date is not within your range of allowed posting dates"
Business Central blocks the posting because the document's Posting Date falls outside the Allow Posting From / Allow Posting To window. The window is read from the user's own row in User Setup first, and from General Ledger Setup only when the user row is empty. Fix the date on the document, or widen the right window, or change your work date if the wrong default was applied.
Error fixBusiness Central: "Select a Dimension Value Code for the Dimension Code"
Business Central stops the post because a Default Dimension for an account, customer, vendor or item has Value Posting set to Code Mandatory, and the document has no value for that dimension. Either supply the dimension value on the line or header, or change the Value Posting rule if the requirement is wrong. Dimension combinations and priorities can produce similar-looking blocks.
Error fixBusiness Central Could Not Open the Company: Causes and Fixes
When Business Central cannot open a company, the cause is almost always one of: the user lacks access or a license, the user record is disabled, the company name in the URL or the user's default company no longer exists, or the environment or server is in a bad state. Check the user, the company list and the URL in that order.
Error fixFixing "Cannot create a record in (table). The record already exists" in D365 F&SCM data entity imports
This is the standard kernel duplicate-key exception, thrown when the Data Management Framework tries to insert a staging row into a target table whose unique or alternate key already matches an existing record. It almost always means the entity's insert-vs-update logic did not recognize the target row as an update, not that you have a true accidental duplicate in your source file.
AI for ERPAI for Dynamics 365 Business Central, on-premises or SaaS, beyond Copilot
AI for Business Central beyond Copilot: grounded question answering over BC's data via OData and APIs, for on-premises and SaaS tenants alike.
Stuck on Microsoft Dynamics 365 Business Central?
Talk to engineers who work inside Microsoft Dynamics 365 Business Central every week, and who build private AI that answers these questions from your own ERP data.
Keep exploring
Free tools
- Business Central AL Extension Skeleton GeneratorFill in publisher, prefix and ID range to get app.json, a table extension, a page extension, an event subscriber codeunit and a permission set.
- Business Central AL Event Subscriber GeneratorBuilds an AL subscriber codeunit for any published event, with the correct attribute syntax and a procedure stub to fill in.
- Business Central Posting Groups Setup WorksheetMap general business and product posting groups to the G/L accounts they should post to before you configure General Posting Setup.
ERP fixes and how-tos
- Adding a Private AI Layer to Business Central On-PremisesAdd AI to Business Central on-prem without cloud: API v2.0, custom API pages, SQL replica, retrieval, local LLM, BC permission sets, approved write-back.
- Fixing "You do not have the following permissions on TableData (table): (permission)" in Business Central ALBusiness Central runtime error You do not have the following permissions on TableData. Why AL extensions hit this and how to add the missing permission set.
- Calling and extending the Business Central API v2.0Business Central API v2.0 explained: the endpoint URL, Azure AD app registration and OAuth 2.0 token, calling standard entities, and custom API pages in AL.
AI on your ERP
- AI for Business Central manufacturing operations, beyond CopilotAI for Business Central manufacturing beyond Copilot: grounded answers on production orders, routings, and capacity via APIs v2.0, on-prem capable.
- AI for Dynamics 365 Business Central in Discrete ManufacturingGrounded AI for Dynamics 365 Business Central discrete manufacturers: production orders, planning worksheets, routings and costing, on a private LLM.
Integrations
- How to add AI agents to Dynamics 365 Business CentralHow to add AI agents to Dynamics 365 Business Central: API v2.0 and custom API pages as the tool layer, approval gates, SaaS vs on-prem, and build options.
- How to add WhatsApp to Microsoft Dynamics 365 Business CentralHow to connect WhatsApp to Dynamics 365 Business Central: API v2.0 or custom API pages, webhooks, template messages, and two-way replies that post back safely.
Software
- Microsoft Dynamics 365 Business CentralDynamics 365 Business Central explained for manufacturers: modules, APIs, AL extensions, deployment, strengths, limits and alternatives for small and mid-size firms.
- Microsoft Dynamics 365 Finance and Supply ChainDynamics 365 Finance and Supply Chain Management explained for manufacturers: modules, data entities, OData, deployment, strengths, limits and alternatives.