Notifications
Announcements
No record found.
Hi everyone,can you tell me, is it possible to see code behind the UI Query. When I create Query like this, I want Axapta to make my code automatically.
*This post is locked for comments
Make a Job,
Query query = new Query(queryStr('Z_PurchCubeHVP'));
info(query.toString());
Hi Crispin ,
This is result from job
I want something like this or what can I do when I know object's reference?
This is sample:
public void runMyDynamicQuery2() { Query q; QueryRun qr; QueryBuildDataSource qbd; QueryBuildRange qbr; q = new Query(); qbd = q.addDataSource(TableNum(CustTable)); qbr = qbd.addRange(FieldNum(CustTable, AccountNum)); qbr.value(">=4000"); // Default operator is ==. qbr = qbd.addRange(FieldNum(CustTable, AccountNum)); qbr.value("<=4022"); qbd.addSortField(FieldNum(CustTable, DlvMode)); qr = new QueryRun(q); qr.prompt(); pause; }
Thank you !
What Crispin meant was query.dataSourceNo(1).toString(). But I'm not sure if it's related to what you want.
Note that no X++ code is generated for AOT queries, but you can create an instance (with new Query(queryStr(Z_PurchCubeHVP))) and use the usual code to add data sources, modify ranges etc.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2