Edit

DataSourceContext data type

Version: Available or changed with runtime version 18.0.

Represents the context passed to a data source codeunit that implements the ITestDataSource interface.

Instance methods

The following methods are available on instances of the DataSourceContext data type.

Method name Description
AppId() Gets the ID of the app in which the test function is defined.
CodeunitId() Gets the ID of the codeunit that is providing the test data for the current test case.

Getting started with AL
Developing extensions
Test codeunits and test methods in AL
TestDataSource attribute
TestHandlerContext data type