SysQuery::mergeFilters Method [AX 2012]
Merges the filters from the source query to the target query.
Syntax
client server public static void mergeFilters(
Query _sourceQuery,
Query _targetQuery,
[int _sourceQueryDataSourceIndex,
boolean _alwaysAddDatasource,
boolean _doNotAddQueryFilterForSameField])
Run On
Called
Parameters
- _sourceQuery
Type: Query Class
The source query.
- _targetQuery
Type: Query Class
The target query.
- _sourceQueryDataSourceIndex
Type: int
The index of the data source in the source query; optional.
- _alwaysAddDatasource
Type: boolean
A Boolean value that indicates whether to always add the data source to the target query; optional.
- _doNotAddQueryFilterForSameField
Type: boolean
A Boolean value that indicates whether adding a query filter for the same field to the target query should not be done; optional.
Exceptions
Exception | Condition |
---|---|
Error | The source query is null Nothing nullptr unit a null reference (Nothing in Visual Basic) . -or- The source data source is null Nothing nullptr unit a null reference (Nothing in Visual Basic) . -or- The target query is null Nothing nullptr unit a null reference (Nothing in Visual Basic) . -or- The source data source was not found on the target query and adding the data source is not enabled. |