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)

Parent and child form

(0) ShareShare
ReportReport
Posted on by

i have a parent form... in Action pane i have newButton...when i press it opens a form that has the same data source as parent... i did this code in clicked() method

void clicked()
{
Args args = new Args();
FormRun formRun;
super();
args.name(formstr(ChildForm));

formRun = classFactory.formRunClass(args);
formRun.init();

formRun.run();
formRun.wait(true);

}

The problem is that when i open the childForm it opens  with data from the parentForm...
i need that ChildForm should be the form where i create records and write the records in ParentForm 
please i need help!!!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,210 Super User 2025 Season 2 on at

    Hi AXDEV_1,

    You can have a look at e.g. creation of customer, sales order, project where also a creation form is opened for creating new records. See how it is implemented on these forms.

  • Community Member Profile Picture
    on at

    I looked through them but there is different a little bit....I want to know if I did right when in child form and in parent form I set the same datasource? I need to do a child form to create records in parent form...

  • Verified answer
    Faisal Fareed Profile Picture
    10,796 User Group Leader on at

    Hi AXDEV,

    How can you use the same datasource for parent and child forms. The forms Andre mentioned in his comments, for creation of sales order is not the parent form of actual sales order list form. Can you share the screenshots what actually you are trying to achieve?

  • Community Member Profile Picture
    on at

    so how can I do this?

  • Community Member Profile Picture
    on at

    so how can I do this?and my form should be with ok and close buttons

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

    You can do this by following the examples above. Check the code, and the properties of the objects involved, like the button/menuitembutton properties or the clicked method that are opening the child forms. Check the form and formdatasource initializations, filters, active links, and their table relations to see what could be the connection between them in order to make it work.

    I am afraid we cannot teach you basic AX knowledge in the limited framework and options within a Community Forum, other than recommending to take a development course, read books, or use the examples already available in the application and documentation/blogs.

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans