I created a query in the AOT. Now i want to use this query in x++ code but without writing the code for the datasource(s) incl. Joins (inner, outer), ranges, etc. again.
I was able to set the query:
query = new Query(queryStr(MyAOTQuery));
but i don't want to set the datasource again:
queryDs = query.dataSourceTable(tablenum(MyAOTTable));
because it's already defined in the AOT query. I'm just looking for a way to read the complete AOT query in x++ to use it.
Any ideas how to set this up?
Martin