web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to recover query result in my form

(0) ShareShare
ReportReport
Posted on by

Hi,

I'm newbie in ax, i've a form MyFrom with a menuitembutton which calls a query form. How to recover and make display

the result of this query in a grid of MyForm? The grid datasource is SMASubscriptionTable, with my query i want to reach

services with a particular enddate and/or particular subscriptionId, etc.

Thanks in advance for your response.

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

     Hi aalmask,

    if I understand you correctly and you want to use standard SysQueryForm to filter record on your form, you can override click() method on your button in a way below. (use your MASubscriptionTable datasource name of course)

     

        SysQueryRun     myQR;
        ;
        myQR = ClassFactory.queryRunClass(element.args());
        myQR.query(SMASubscriptionTable_DS.query());
        myQR.run();
        SMASubscriptionTable_DS.executeQuery();

  • Community Member Profile Picture
    on at

    Hi ser,

    first of all, thanks for answer me quickly.

    Nevertheless, i managed to make me understand, despite my English level. That's it, i want to filter
     
    SMASubscriptionTable with the query used in the "SysQueryForm" and with the criteria that the user has
     
    set to obtain records in a grid in MyForm, the grid with SMASubscription_DS as datasource.
     
    But, how to recover ranges which will set by the user in the SysQueryForm.
     
    In my situation, i created a query object in AOT, then a menuitem action with the name of my query for my
     
    menuitembutton which is in MyForm.
  • Community Member Profile Picture
    on at

     Hi again,

    Reread your first post again. Why you are not satisfied with standard DAX filtering (Ctr + F3)?

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans