Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Lock parent form during dialog popup

(0) ShareShare
ReportReport
Posted on by 150

Hello,

I am trying to force the user to respond to a popup dialog(RunBase) form when changing the the SalesPrice on the salesLine. 

I have set the dialog prompt to Popup using:

dialog.formBuildDesign().windowType(FormWindowType::PopUp);

This would keep the dialog on top, but the user can still disregard the popup or navigate away from the record

Is there a way to lock the parent form till the user respond to the popup?

Thanks for nay help.

*This post is locked for comments

  • Suggested answer
    cowboyott Profile Picture
    cowboyott 200 on at
    RE: Lock parent form during dialog popup

    Rather than extending the dialog class, you could just use the Dialog.parmIsModal() method. Here is an example: timsaxgrind.blogspot.com/.../making-dialog-form-stay-on-top.html

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    Re: Lock parent form during dialog popup

    If you call FormRun.wait(true), the form will be modal, i.e. users won't be able to work with any other form.

    To use it, you have to open the form from code like this:

    FormRun fr = classFactory.formRunClass(new Args(formStr(YourModalForm)));
    fr.init();
    fr.run();
    fr.wait(true);

    Or you can extend the Dialog class (run() method) to support the same behavior.

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans