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)

Data from Form to Dialog

(0) ShareShare
ReportReport
Posted on by

Hello There!

I ve got a problem with data. I have to transfer data from Form to Dialog. Any Ideas?

Thanks for your help!

*This post is locked for comments

I have the same question (0)
  • Denis Macchinetti Profile Picture
    16,444 on at

    Hi

    What do you mean with "data"?

    Can clarify better your requirement?

  • Community Member Profile Picture
    on at

    Hi,

    Sorry. I' ve got two forms and one dialog. I have to transfer one record from data source in Form A to Form B. Later, I need transfer this record transfer to Dialog. Transfer between forms is done. But I cant do the same with dialog.

    Thanks.

    PS. Sorry for my last post, but this is my first visit on this page :)

  • Verified answer
    dolee Profile Picture
    11,279 on at

    Hi,

    One common scenario that fits your description is to click on a menuitem button to perform certain action and a dialog prompts for user to enter parameters. In that case, in the Main method of the target class you can make use of the "args" parameter.

    args.caller() -> the caller object (in this case, the caller form)

    args.record() -> the record selected in the form datasource when the menuitem button is clicked.

    args.record().datasource() -> get you the form datasource instance.

    If you are looking at a different scenario, can you elaborate?

    Kind regards,

    Dominic Lee

  • Verified answer
    Denis Macchinetti Profile Picture
    16,444 on at

    Hi

    Have a look at standard class ProdJobUpdate, main method.

  • Verified answer
    dolee Profile Picture
    11,279 on at

    Wow I missed a lot during typing. =]

    If you have the record buffer in Form B, you can create a method in form B that would return that record.

    Then in Dialog, you go:

    Object callerForm;

    MyTable myTable;

    callerForm = args.caller(); // callerForm now contains a reference to Form B

    myTable = callerForm.parmMyRecord(); // parmMyRecord() returns the record buffer

  • Verified answer
    Community Member Profile Picture
    on at

    you need to use Args object to fetch the data from Form to Dialog

    Args object in Dialog will have method called Args.Caller() which basically will give you the object of caller form and once you have the Form Object you can call any method on the form.

    May you need to create some method on the form which will return the required data which you need to pass from Form to Dialog

    Please verify and let me know if this details helps you.

  • Community Member Profile Picture
    on at

    Thanks Everybody for your help ;)

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