Publishing pages and codeunits as OData/SOAP web service endpoints
Publishing Business Central pages, queries, and codeunits as OData V4 or SOAP web service endpoints. It answers questions on publishing, bound actions, UI handling in web service calls, troubleshooting errors, and the SOAP feature key removed in version 30.0.
Path: Integration > Web services > Publishing pages and codeunits as OData/SOAP web service endpoints · tier official · system service · narrative reviewed (checked by Opus)
Overview
This section explains how to expose pages, queries, and codeunits as web service endpoints, using OData V4 or SOAP. The main page describes publishing on the Web Services page and notes that API pages and API queries should be used for new integrations instead of standard web service publication.
Other pages cover specific tasks. One walks through creating an OData V4 bound action that copies unposted sales invoices and is called with HTTP POST. Another explains how to use GUIALLOWED to suppress dialogs and handle exceptions when code runs through a web service. A troubleshooting page explains that errors can come from the client, network, or server, and advises against relying on Microsoft page APIs in favor of stable built-in APIs.
Start with the publishing page to understand the endpoints. Then read the UI handling and bound action pages if you write AL code for them. Check the feature key page if you still use SOAP on Microsoft UI pages, since it was deprecated and removed in version 30.0.
Key points
- Pages, queries, and codeunits are published on the Web Services page and become OData V4 or SOAP endpoints.
- For new integrations, use API pages and API queries instead of standard web service publication.
- OData V4 bound actions run AL procedures on specific records and are called via HTTP POST.
- Bound actions use the ServiceEnabled attribute, WebServiceActionContext, and the ODataKeyFields property on the page.
- Use GUIALLOWED to suppress dialogs and user interaction when code runs through a web service.
- The Disable SOAP web services on Microsoft UI pages feature key was deprecated and removed in version 30.0; migrate to REST APIs or OData.
- Web service errors can originate from the client, network, or server, so troubleshoot each layer.
- Avoid exposing Microsoft pages as APIs; prefer stable built-in APIs.
Learn pages
- Creating and Interacting with an OData V4 Bound Action: Create an OData V4 bound action in AL, publish its page, and call it with an authenticated POST request to copy an existing sales invoice in Business Central.
- In the observatory: Codeunit 6620 “Copy Document Mgt.”
- Disable SOAP web services on Microsoft UI pages feature key: Learn about the Disable SOAP web services on Microsoft UI pages feature key.
- Handling UI interaction when working with web services: Describes how UI methods can make web service calls fail.
- Publish a Web Service in Business Central: Publish OData V4 and SOAP web services in Business Central. Choose supported objects, set permissions, verify service URLs, and unpublish services.
- In the observatory: Page 21 “Customer Card”, Page 810 “Web Services”
- Troubleshooting errors in OData/SOAP web services on pages, queries, and codeunits.: Learn about how to troubleshoot Business Central web service errors on OData/SOAP endpoints on pages, queries, and codeunits.
Videos, posts and code changes
Linked by a Haiku matcher with a grounding quote from the item’s summary (link/topics.ts); machine-generated.
- #10992 [Extensibility Request] issue 30420: add service post and send events (code change): “extension points that allow integrations to support additional service”
- #11342 [29.x][ALL-E] Document Type is Quote in Document Attachment table (1173) after posting a Sales Invoice with attachmentsIntial Commit (code change): “Document attachments transferred after posting a sales invoice”
Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.
What Learn documents here 5 Learn pages
- learnCreating and Interacting with an OData V4 Bound Action2026-10-29
- learnDisable SOAP web services on Microsoft UI pages feature key2025-03-26
- learnHandling UI interaction when working with web services2023-12-18
- learnPublish a Web Service in Business Central2026-10-29
- learnTroubleshooting errors in OData/SOAP web services on pages, queries, and codeunits.2025-03-11