# Business Central Error Messages: What They Mean and How Errors Are Handled

> Source: https://netray.co/erp-help/bc-business-central-error-messages-errorinfo-collect-troubleshoot
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: ERP Help

## 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.

## Kind

error

## System

dynamics

## Erp

Microsoft Dynamics 365 Business Central

## Module

Error handling / troubleshooting

## Query

business central error messages

## Alternate Queries

- business central error message management
- error handling in business central
- field error in business central
- business central not working

## Applies To

Business Central online and on-premises. ErrorInfo and error collection are available in current versions, check your version for exact availability.

## Steps

### Troubleshoot a Business Central error message

**Items:**

- Read the full text, not the first line. The identification fields and values at the end usually say which record is wrong.
- Use Copy details in the error dialog if available and note the date, time and user for support or telemetry lookups.
- Match the pattern: must have a value (TestField), must be equal to (FieldError), already exists, another user has modified, or you do not have permission.
- Open the record named in the message and fix the field or setup, for example a missing posting group or dimension.
- For permission messages, check the permission set for the exact table or object named and use the user's effective permissions.
- Reproduce with the debugger or the Page Inspector (Ctrl+Alt+F1) to see the table and field behind the message.
- If 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.
- If 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.

## Sections

### The messages you will see most

**Body:**

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

**Body:**

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.

**Code:**

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

**Body:**

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

**Body:**

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.

## 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.

## Ai Angle

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.

## Faq

### What is the difference between Error and FieldError in AL?

**Answer:** 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?

**Answer:** 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?

**Answer:** 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?

**Answer:** 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.

## Search terms

business central error messages, business central error message management, error handling in business central, field error in business central, TestField must have a value, ErrorInfo AL, business central not working, business central not working today, TryFunction AL, Error Messages page business central

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
