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)

Query select button on Forms

(0) ShareShare
ReportReport
Posted on by

Hi Community,

I have come across a requirement to show query ranges on the form, also the form should have a select button where I can select my range values and further use it to process my data. In effect I am looking for something like a query dialog embedded in my form.  I know that it can be done in a dialog but my requirement is to do it in a form. Not sure if this is a possibility in AX 2012. I remember from my memory that till AX 4.0 this was a possibility but I am not able to find anything in 2012 as an example.

Please suggest.

Kumar

*This post is locked for comments

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

    Try creating Button using

    Dispaly menuitem

    RunBaseQueryDialog

    It will take Query object of the form show the Query form

    Please verify and update if this is what you are looking for.

  • Verified answer
    Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    Do you mean something like pressing Ctrl+F3? A command button with Command = Advanced Filter/Sort: 2837 will do the job.

    To show the ranges, you would have to implement it by yourself (although you might be able to utilize RunBaseDialogModify class).

  • Kumar Gaurav @ MS Profile Picture
    on at

    Thanks for the response Nitesh, but this doesn't seems to be providing the query object in form (despite providing query property). It seems to be asking for a query run object.

    @Martin : Thanks for the response , what you are suggesting is for the advance filter, I am looking for a report dialog type thing on form where I can have a query embedded and based on the selection in query I want to further process.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Kumar,

    You need to do some bit of coding here..

    You need to call the MenuItem with caller as runBase class and runbase class will have query,

    Please verify and try to contact your dev consultant for your support

  • Kumar Gaurav @ MS Profile Picture
    on at

    I see , but then it differs from my requirement. I want the query object embedded in my form as it appears in report dialog and other periodic dialog.

  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    I think you're trying to implement something what should be solved by other means - that's why you're struggling.

    What happens with RunBase dialogs is that these controls are added to the form at run-time with the help of the RunBaseDialogModify class. If you want the functionality of RunBase dialogs without actually using RunBase dialogs (why?), you'll have to implement the same functionality by yourself.

    By the way, are you aware of that you can use a form modeled in AOT as a RunBase dialog? See tutorial_RunbaseForm (class and form) for an example.

  • Verified answer
    Kumar Gaurav @ MS Profile Picture
    on at

    Thanks for the response Martin, I guess you are right about the other means. This requirement would have been a candidate for run base dialog pattern had it been the only requirement, but I what I am trying to do is make up to the wishful thinking of my functional where he needs this in an already existing complex form.

    I think a work around will be to provide a link rather than embedded query.

  • Community Member Profile Picture
    on at

    Hi All,

    My form datasource is CustTable. I receive a request to put "Select" button on the form.  when they click on Select button, a query form is displayed with Custinvoicejournal datasource. such as this image

    CUstInvoice.jpg

    Can you tell me how to do it.

    Thanks a lot

    Linda 

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