Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

AX 2012 R3. Modal popup form. How to Lock parent form

Posted on by 2,983

Hi, I have this code executed from a Parent Form:

argsv.record(WMSOrderTrans);


       formRun = new menufunction(menuitemdisplaystr(ChildForm),menuitemtype::Display).create(argsv);
       formRun.init();
       formRun.run();
       formRun.wait(true);       
       
       if (formRun.closedOk())       
       {
         new menufunction(menuitemdisplaystr(ChildForm2),menuitemtype::Display).run(args);

       }


This used to work all right for me in AX 4. However in 2012 R3, after the formRun.wait(true), I can play around with my parent form. I need to lock my parent form.

Any ideas??

*This post is locked for comments

  • RE: AX 2012 R3. Modal popup form. How to Lock parent form

    I tried it out.

    The root cause seems to be the combination of FrameType being None on the Parent form together with the fact that the parent form is in turn opened from another form (MainForm). Opening ParentForm directly and then child, or changing FrameType on ParentForm to Standard seems to fix the issue.

    In any case, if it is important for your workflow that the FrameType is in fact None, create a support ticket. I however am not sure this will get fixed, as it is not very severe, and it a very corner case.

  • Malcolm Burtt Profile Picture
    Malcolm Burtt 1,475 on at
    RE: AX 2012 R3. Modal popup form. How to Lock parent form

    You could consider hiding the parent form when the child opens as a workaround. That's a fairly nasty fix though as it would mean that the user loses any contextual information carried on the parent form.

  • Ghetz Profile Picture
    Ghetz 2,983 on at
    RE: AX 2012 R3. Modal popup form. How to Lock parent form

    Thanks for your answer,

    I think the problem might be there when linking several forms. What we have done is enable a Main Menu Form, and from this we call the parent form, and then finally the popup child form.

    I've created a simple project so you can test for yourself. Please download here: http://we.tl/gr2oS58EZ2

    Just open the "DT_Test_Main" form. You will see the button to open de parent form and from there a button to open the child. In my case at least, I can return to the parent form, so it's not modal.

  • RE: AX 2012 R3. Modal popup form. How to Lock parent form

    Nope, not even then

  • Ghetz Profile Picture
    Ghetz 2,983 on at
    RE: AX 2012 R3. Modal popup form. How to Lock parent form

    OK, i've played around with the parent form settings. Not sure if this may be a bug, but if I set the parent form's design frame property = None, I'm able to return to the parent form.

    However, is frame property = Standard, then the child is modal, and I cannot return to the parent form.

    Could you confirm this please?

  • RE: AX 2012 R3. Modal popup form. How to Lock parent form

    I just tried on the build that I have (R3 CU8), and it works fine, the child form is a modal dialog so you can't click away from it

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans