Tables
Default Table Display
The Microsoft Dynamics 365 Business Central cmdlet 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 cmdlet has displayed, first configure the tables you want as a Web Service from your account. The cmdlet then detects the exposed endpoints and displays them. To do this, follow these steps:- Log in to your Dynamics 365 Business Central account.
- Navige to Web Services and click New.
- Under Object Type, select Page or Query. The Codeunit option is available in Dynamics 365 Business Central version 16.3 or later.
- In the Object ID open the dropdown list and click Select from full list.
- Select the tables you want to display from the Object Name column.
- Specify the Service Name to define how the service is displayed.
- Select the Published check box and wait until the OData V4 URL field is populated.
- Inspect the upper right corner of the page to make sure the changes are saved.
- 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.