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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Data transfer with DropDialog

(1) ShareShare
ReportReport
Posted on by 3,542

It's my first time working with AX2012. But I guess the solution would be more or less the same in D365. My knowledge of code on forms is also limited.

Form A displays records from table X. Table X has children in table Y.

I need to implement a button on form A which duplicates a record X and all its Y children. A dialog is needed to specify a new ID for the duplicate record X.

I completed the project in more or less 10 seconds with the following method:

  1. Create methods on table X and Y with parameters oldID and newID. The methods find records with oldID -> buf2buf -> change Id to newID - > insert
  2. On clicked method of button -> prompt user for newID with a normal dialog from code and call copy methods on Table X and Y
  3. Refresh datasource on form A

My boss now wants a drop dialog instead of a normal pop-up - back to the drawing board for me.

  • I don't know how to create a drop dialog from code, so I created a form in the AOT from some existing example. Is this the correct method? I't feels like overkill as I only need one field.
  • I plan to get the record to be duplicated through args. And then when OK is clicked on dropdialog -> do the actual copy. But then where do I refresh datasource on form A? Should I access form A through args aswell? And refresh its datasource on the dropdialog form?

Sorry for the long post. Thanks for reading.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mea_ Profile Picture
    60,286 on at

    Hi Pete Alberts,

    It's not an overkill, please check standard form "SalesCancelOrderDropDialog" It could be used as an example for you as it does refresh of parent forms datasource. 

  • Pete Alberts Profile Picture
    3,542 on at

    Thanks, I looked at that form and it helped a lot.

    The mentioned form "refreshes" the parent form's datasource with the research() method. There are three methods that I am aware of that seem to have something to do with "refreshing" a form data source: research(), refresh(), reread(). So most of the super-seniors at my company use the classic developer method - just call all three. Any comments on the difference between these methods or somewhere I may read more?

    (This should be a new post, but I'm lazy and I if there was a max questions per week rule, I'd be way over.)

  • Mea_ Profile Picture
    60,286 on at

    Just read this http://kashperuk.blogspot.com/2010/03/tutorial-reread-refresh-research.html and give you seniors to read. 

  • Pete Alberts Profile Picture
    3,542 on at

    Thanks, much appreciated.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Basit Profile Picture

Basit 1

#1
GL-01081504-0 Profile Picture

GL-01081504-0 1

#1
Roya Profile Picture

Roya 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans