topic hubService Managementofficial - Microsoftreviewed - checked by Opus

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

Videos, posts and code changes

Linked by a Haiku matcher with a grounding quote from the item’s summary (link/topics.ts); machine-generated.

Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.

What Learn documents here 5 Learn pages