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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Code for Open new form with the transaction of selected Record with a user date filter

(0) ShareShare
ReportReport
Posted on by 371

Hello,

there is one requirement that when the user select to date to from date and there is one button on action pane menu when the user click that button then the transaction form will open with a date filter as we see on  GL>when we click on account>and click on posted then the transaction form will open..like this we have to do but with a date filter... pls help me  

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    Please clarify if your requirements are for AX 2012 or Dynamics 365 for Operations, since Current version in your tags are referring to AX 7.

    You can use Args class to pass in records or variables to a form. This design pattern is explained in the documentation:

    msdn.microsoft.com/.../aa619732.aspx

    Also you may find an example here:

    dynamics-ax-live.blogspot.hu/.../how-to-open-form-by-code.html

    If you want to do additional filtering, you may use QueryBuildDatasource and QueryBuildRange in the init() of your form datasource on the popup form.

  • CU02060633-1 Profile Picture
    371 on at

    thanx @ vilmos...i am currently using the AX 2012 R3...above example that the form opens in GL..like that i have to make a form but show the transaction of the customer with the proper date filter...

    But i make a filter in date for example in the transaction for the 1 main account...there is trans date is 15/02/2016.... 31/05/2016.......25/08/2016...... so if the user select the first 2 date then the n trans show the first 2 online not the all transaction is it possible to do it 

  • CU02060633-1 Profile Picture
    371 on at

    @crispin user select the date from the dialog

  • CU02060633-1 Profile Picture
    371 on at

    thanx @ crispin afetr that the trasaction form will open with the filter date like the same thing happen in trail balance if we select the date in tha parameter the record show the filter date

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    It does not really matter where your data is coming from, and where to do you pass it. The logic is the same as in the original post. Get the values you want to your query range to be based on, put it in an Args(), pass the Args down to the form you are about to open i.e. with ClassFactory.formRunClass(), and then process it on your opened form in the datasource.

    The example provided is the principal which you need to apply for your situation. There are a lot of examples for this within the application as well.

    If what you are saying is that you want a different filter, you may also clear that on the QueryBuildDatasource of your form datasource, take a look at the documentation and blogs for cleardynalinks and clearranges.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Sanhthosh.Kumar.K Profile Picture

Sanhthosh.Kumar.K 2

#2
Raed Salah Bzour Profile Picture

Raed Salah Bzour 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans