How to add custom fields to the standard Business Central APIs

How custom (table extension) fields surface in Business Central's OData API and how Skuno BI exposes them automatically across every table.

By Skuno Engineering Last reviewed Verified on BC25, BC26, BC27

At a glance

What this coversCustom fields added via table extensions, or ISV apps
Microsoft OData APIOnly exposed if you write a custom API page (publishing standard pages as OData is being deprecated)
Skuno BIAll custom fields are auto-exposed on every OData endpoint
Affected object typesTables, table extensions
Versions coveredBC14 onwards (custom field IDs in the 50000+ range)

In Microsoft Dynamics 365 Business Central, custom fields (whether added through AL table extensions, partner extensions, or ISV extensions from AppSource) are not automatically exposed by the standard REST API. Adding a custom field to a table requires a custom API page to expose it on a new endpoint before it can be read through the API. This guide explains why, what your options are inside Business Central, and how Skuno BI removes the requirement entirely.

Why custom fields aren’t exposed automatically

The Business Central REST API is page-based, not table-based. The API v2.0 endpoints (customers, items, salesOrders, and the rest) are each backed by an API page in AL. An API page is an object that explicitly declares which table fields are included in the response and which are writable. Adding a column to a table doesn’t change the API page; the page still emits the same JSON it was designed to emit, with the same field set.

This design has real benefits: Microsoft can guarantee a stable schema across releases, and developers can change the underlying table without breaking integrations. The cost is that exposing a field becomes the responsibility of whoever added it. If you bought an ISV app that adds a Loyalty Points column to Customer, you need to ask the vendor to create a new API page which includes the field (or write one yourself) before your integration can read it.

The historical workaround was to publish a standard page (e.g. the Customer Card) as an OData web service, which would emit whatever fields the page itself displayed. Microsoft is deprecating that pattern, and the property names it produced were always unstable (derived from AL captions and prone to break when the page was edited). New integrations should not rely on it.

Creating a custom API page

The standard Microsoft API pages (APIV2 - Customers, APIV2 - Items, and so on) cannot be extended. AL’s pageextension object only works against pages with PageType of Card, List, Worksheet, and similar. It does not work against PageType = API. There is no supported way to add a field to one of Microsoft’s existing API endpoints.

To expose a custom field, you have to author a brand new API page in AL with PageType = API, declaring its source table and the fields to expose. This gives you full control over property naming, OData annotations, and which operations are allowed (read, insert, modify, delete). The new page lives at its own URL, /api/{APIPublisher}/{APIGroup}/{APIVersion}/companies({id})/{EntitySetName}. The standard /api/v2.0/ endpoints are unchanged and still emit Microsoft’s original schema.

This is the right approach if you are comfortable with developing and deploying your own Business Central extension in AL on every tenant that needs the field, and if your integration falls within Business Central’s API limits. You’ll also need to maintain this page whenever the underlying table is affected by a Business Central update, and re-publish a new page for each API version you want to support.

How Skuno BI exposes custom fields

Skuno BI operates on a continuously-synchronised copy of your Business Central database, surfaced as a tenant-scoped OData v4 endpoint at https://<tenant>.skuno.app/api/v2.0/odata/bc/. Because the sync runs at the table level rather than the page level, every column on every table is visible to Skuno BI, including any custom field added via AL, a configuration package, or an ISV app.

When Skuno BI serves a row from any table, the response is a superset of the base BC table schema. It includes:

  • Every standard Microsoft field
  • Every FlowField, evaluated server-side at read time
  • Every custom field on the base table
  • Every field added by table extensions (your own or any installed ISV app)

Field names follow a consistent normalisation rule: non-alphanumeric characters in the AL field name are replaced with underscores, and the original casing is preserved. A custom field declared in AL as "Loyalty Points" (field 50100 on the Customer table) appears in the response as Loyalty_Points. Types are mapped automatically into OData, and the $metadata document at the endpoint root publishes the exact schema for whatever extensions are deployed on that tenant.

There’s no AL development involved and no per-field configuration to do. The first sync after a new field appears on the table picks it up automatically.

Practical example: a Loyalty Points custom field

Suppose you’ve added a Loyalty Points field (field 50100, Decimal) to the Customer table via a table extension named Loyalty Customer Ext. The three sections below show what the standard endpoint returns, what a custom API page looks like, and what Skuno BI returns without any AL work.

Microsoft API v2.0: not exposed, and the page can’t be extended

GET /api/v2.0/companies({id})/customers({customerId})

{
  "id": "...",
  "number": "10000",
  "displayName": "Cannon Group",
  "type": "Company",
  // ... standard fields only
  // loyaltyPoints is NOT here, and there's no way to add it to this endpoint
}

The APIV2 - Customers page is PageType = API, which AL’s pageextension object refuses to extend. There’s no way to make Microsoft’s /api/v2.0/customers emit loyaltyPoints.

Custom API page: a new endpoint with the field

page 50100 "Customer With Loyalty API"
{
    PageType = API;
    SourceTable = Customer;
    APIPublisher = 'contoso';
    APIGroup = 'crm';
    APIVersion = 'v1.0';
    EntityName = 'customer';
    EntitySetName = 'customers';
    DelayedInsert = true;
    ODataKeyFields = SystemId;

    layout
    {
        area(content)
        {
            repeater(Group)
            {
                field(id; Rec.SystemId) { }
                field(number; Rec."No.") { }
                field(displayName; Rec.Name) { }
                field(loyaltyPoints; Rec."Loyalty Points") { }
            }
        }
    }
}

After publishing this AL extension to every tenant that needs it, the field is reachable at a new URL. Microsoft’s /api/v2.0/customers endpoint is unaffected:

GET /api/contoso/crm/v1.0/companies({id})/customers({customerId})

{
  "id": "...",
  "number": "10000",
  "displayName": "Cannon Group",
  "loyaltyPoints": 1250.00
}

Skuno BI: exposed automatically

GET https://mycompany.skuno.app/api/v2.0/odata/bc/Customer_18
    ?$filter=No eq '10000'
    &$select=No,Name,Loyalty_Points
{
	"@odata.context": "https://mycompany.skuno.app/api/v2.0/odata/bc/$metadata#Customer_18",
	"value": [
		{
			"No": "10000",
			"Name": "Cannon Group",
			"Loyalty_Points": "1250"
		}
	]
}

The endpoint is addressed by table name and number (Customer_18), the custom field appears alongside the standard ones, and no page extension, AL deployment, or environment configuration was required.

Gotchas

API pages can’t be extended, only re-authored. AL’s pageextension object only applies to pages with PageType of Card, List, Worksheet, and friends. Microsoft’s APIV2 - Customers, APIV2 - Items, and the rest are PageType = API and can’t be extended. To expose a custom field, you must build a brand new API page from scratch and publish it under your own APIPublisher/APIGroup/APIVersion. The standard endpoints stay as they are.

Each API page is its own URL. A new API page doesn’t add fields to /api/v2.0/customers. It creates a new endpoint at /api/{publisher}/{group}/{version}/.... If your integration is consuming /api/v2.0/customers, it has to be repointed at the new path to see the custom field.

Flowfields on custom tables can be expensive. Custom fields that are flowfields (CalcFormula-based) are calculated on every read. Exposing them via API for high-volume integrations can cause unexpected database load, especially when the calculation joins against large transaction tables like Item Ledger Entry.

When to use which approach

A custom API page in AL is the right answer when you’ve added a domain object that doesn’t fit any existing endpoint, and your consumer needs a Microsoft-native API surface. That usually means a Power Automate flow, a Microsoft 365 add-in, or anything else that expects to authenticate through Entra ID against api.businesscentral.dynamics.com. You’re trading ongoing AL maintenance for that integration fit.

Skuno BI is the better fit when there are lots of custom fields, when those fields keep changing, or when you need the same shape of data across several tenants. The sync picks new fields up on its own and the OData endpoint is the same shape on every tenant, so an integration written against one customer’s data works against the next without per-tenant code.

Learn more about how Skuno BI surfaces Business Central data →

Frequently asked questions

How do custom fields work in the Business Central API?

Custom fields added via AL table extensions are not automatically exposed by Business Central’s REST API v2.0. To make a custom field accessible via API, a developer must build a new custom API page in AL that includes the field. There is no automatic mechanism; fields you add to a table do not become queryable over the API by default.

Can I add a custom field to the standard Business Central API?

No. The standard Business Central REST API v2.0 endpoints are fixed to what Microsoft ships out of the box. The supported options for exposing a custom field are to write a custom API page in AL (PageType = API) and deploy it as an extension to every tenant, or to use a sync-based product like Skuno BI that exposes the full table (custom fields and all) as an OData endpoint. The older workaround of publishing standard pages as OData web services is being deprecated by Microsoft and shouldn’t be used for new integrations.

What is the difference between a custom field and a flowfield?

A custom field is a regular stored column added to a table (or table extension) and persists data directly. A flowfield is a calculated field whose value is derived at read time by summing or counting other tables (CalcFormula in AL). Both can be exposed via API via a custom API page but flowfields may incur a runtime cost on read, especially when combined with flowfilters, so they’re typically avoided in high-volume API workloads.

How does Skuno BI expose Business Central custom fields?

Skuno BI auto-discovers every custom field on every synced table and exposes them on its OData v4 endpoint alongside standard fields. There’s no need to author a custom API page or do per-field AL development. Custom field names follow the same normalisation as standard fields: non-alphanumeric characters in the AL caption are replaced with underscores and the original casing is preserved, so Loyalty Points becomes Loyalty_Points. Types are mapped automatically into OData, and the $metadata document at the endpoint root reflects each tenant’s actual extension set.

Are custom field changes captured in Skuno BI's change tracking?

Yes. Skuno BI’s sync includes a serialized row version column on every table, which advances on any change, including writes to custom fields and calculated flowfields. Delta syncs against Skuno BI will pick up custom field updates without any additional setup, even if the field was added after the initial sync.

How are flowfields exposed in the Business Central API?

Business Central uses SumIndexField Technology (SIFT) in SQL Server to efficiently calculate flowfield results when queried via the API. While this improves the efficiency of reading calculated fields, it still involves performing a series of database calls and calculations before arriving at a result. For reporting or integration workloads, it is generally better to use a purpose-built analytical datalake like Skuno BI, so your queries don’t impact the performance of your production ERP.