OData Web Services
You can use OData web services to show Business Central data, and you can update data in a Business Central database using OData web services.
OData can be found in other Microsoft products and technologies, including the following:
Microsoft Excel implements OData for its PowerPivot add-in.
Microsoft SharePoint can expose its list-oriented data with OData.
Microsoft Azure Table Services are based on OData.
The topics in this section describe the key concepts and techniques for accessing Business Central data from OData applications that are supported by Business Central .
|Use OData to obtain an AtomPub document.||Using OData to Return or Obtain an AtomPub Document|
|Use OData to obtain a service metadata (EDMX) document.||Using OData to Return or Obtain a Service Metadata (EDMX) Document|
|Use filter expressions in OData URIs.||Using Filter Expressions in OData URIs|
|Use FlowFilters in OData URIs.||Using FlowFilters in OData URIs|
|Use server-driven paging in OData URIs.||Server-Driven Paging in OData Web Services|
|Navigate in an OData web service application by using resource properties.||Using Containments and Associations|
|Write to the database through an OData web service that exposes a writable page.||Using OData Web Services to Modify Data|
Enabling and Configuring OData on the Business Central Server
The Business Central Server instance has several configurations settings that enable and control OData services. For more information, see OData Services Settings.
You can specify filters in OData web services in general that are not supported in Business Central , such as using an OR operator to filter on two different fields. In those cases, you will see the following error:
An error occurred while processing this request. The 'OR' operator is not supported on distinct fields on an OData filter.
Lambda operators are not supported by Business Central OData APIs. If lambda operators are used, the filter expression will be ignored.
If you use Web services that are based on UI pages, you must expect the same behavior from the Web service as from the UI page. If you want to have full control and separation of concern it is recommended to use the Business Central APIs instead.
Business Central supports deep insert, but not deep patching. Multiple requests will need to be issued when patching nested entities.