Today I am will be emphasizing on how to modify existing AOT queries.
Suppose we have a scenario where we want to add date range to existing AOT query which is through SysQuery Class.
First we need to attach datasource on which we are building range but we are not adding datasource. e.g.,
qbds = queryCopy.dataSourceTable(tableNum(Table));
We are adding ranging to existing query itself but not to new query.it will create new if you add this following statement.
qbds = queryCopy.adddataSource(tableNum(Table)); //this will create new query so this wont effect existing query. so, avoid this
if want to modify range which is through SysQuery Form, then you wont add range, you will modify existing range of existing query. this will effect runtime.
This is how you work on existing query. This is just a simple example, there are a lot of things you can learn on this.
you can also write as follows.
Hope you understood.
Till then Happy DaXing………..,