ODBC Driver for Microsoft Dynamics 365 Business Central

Build 24.0.9060

Tables

Default Table Display

The Microsoft Dynamics 365 Business Central driver only exposes tables configured as Web Services in your account. It uses the Odata services of Microsoft Dynamics 365 Business Central to dynamically obtain and display the list of tables after you connect. You can display additional tables; the next section describes the procedure.

Displaying Additional Tables

If you want to display tables (endpoints) other than the ones the Microsoft Dynamics 365 Business Central driver has displayed, first configure the tables you want as a Web Service from your account. The driver then detects the exposed endpoints and displays them. To do this, follow these steps:

  1. Log in to your Dynamics 365 Business Central account.
  2. Navige to Web Services and click New.
  3. Under Object Type, select Page or Query. The Codeunit option is available in Dynamics 365 Business Central version 16.3 or later.
  4. In the Object ID open the dropdown list and click Select from full list.
  5. Select the tables you want to display from the Object Name column.
  6. Specify the Service Name to define how the service is displayed.
  7. Select the Published check box and wait until the OData V4 URL field is populated.
  8. Inspect the upper right corner of the page to make sure the changes are saved.
  9. Repeat this procedure for any other tables (configured as web services) that you want to add.

Filtering with AL Enum objects

Some Business Central API pages, including most API v2.0 pages, have fields based on AL Enum objects.

Fields based on AL enum objects must have names that are consistent and always the same so that filters on the report always work no matter the language or OS you are using. For this reason, the fields based on AL enums are not translated and Buisness Central API requires them to be encoded to avoid any special character.

To be able to filter with an Enum value, you need to encode the value by refering to https://www.w3.org/Style/XSL/TestSuite/results/4/XEP/symbol.pdf documentation and appending _(underscore) before and after the symbol.

In particual, for space this would be "_x0020_". e.g: SELECT * FROM DimensionSetLines WHERE parentid={id} and parentType='Sales_x0020_Order'

To check if the field is an enum object you can refer to the IsEnumeration column of the sys_tablecolumns table.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060