This documentation is archived and is not being maintained.
QueryBuildDataSource.clearRanges Method [AX 2012]
Deletes all ranges that are associated with the data source.
public void clearRanges()
Run On
Called
The following example adds ranges and then removes them from a data source.
Query Q = new Query();
QueryBuildDataSource ds = q.addDataSource(TableNum(CustTable));
QueryBuildRange r = ds.addRange(FieldNum(CustTable, recId));
print ds.rangeCount();
ds.clearRanges();
print ds.rangeCount();
pause;