CTRL_TableDataSource
Class · Group: Controllers
apex
global inherited sharing class CTRL_TableDataSourceController class responsible for managing the instantiation of a data source class that supports the table data source interface. This controller allows fetching table data from dynamically specified classes, providing flexible table-based data retrieval capabilities.
Example
apex
DTO_BaseTable result = CTRL_TableDataSource.fetch(
'AccountTableSource',
new Map<String, Object>{'industry' => 'Technology'}
);See Also: IF_TableDataSource
Methods
| Method | Description |
|---|---|
| global static DTO_BaseTable fetch(String controllerName, Map<String, Object> searchParameters) | Dynamically creates an instance of a specified table data source controller and retrieves data based on the provided search parameters. |
fetch
apex
@AuraEnabled global static DTO_BaseTable fetch(String controllerName, Map<String, Object> searchParameters)Dynamically creates an instance of a specified table data source controller and retrieves data based on the provided search parameters. The class specified by controllerName must implement the IF_TableDataSource interface.
Parameters
| Parameter | Type | Description |
|---|---|---|
controllerName | String | The fully qualified class name of the data source controller to instantiate. The class must implement the IF_TableDataSource interface. |
searchParameters | Map | A map of search parameters, where each key-value pair specifies a criterion or filter to apply to the data source. |
Returns DTO_BaseTable — A DTO_BaseTable object containing the search results formatted as a table.
Example
apex
DTO_BaseTable result = CTRL_TableDataSource.fetch('MyDataSource', new Map<String, Object>{'key' => 'value'});