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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to lock Form during lunch a class?

(0) ShareShare
ReportReport
Posted on by 110

I have a simple Form MyCustomForm, in a Form's Button in Clicked method I call a Class (method run), so I want to lock (or block) this form during run execution.

My code is look like this :

void clicked()
{// in Button clicked in **MyCustomForm**
     MyClass myClass;
     super();
     myClass = new MyClass();

     // here I want to freeze my FORM 
     myClass.run();
    // here I want to unlock my Form
}

I need this because when class (MyClass) is running can display Dialog etc, but I don't want to touch/click and other on MyCustomForm caller.

If I use :

element.wait(); // not work well - block all
myClass.run();


Thanks, enjoy.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi DanielePax,

         Please check this below link, may useful to you.

    https://msdn.microsoft.com/en-us/library/formrun.lock.aspx

    Thanks

    Suresh

  • daniele scr Profile Picture
    110 on at

    Hi Crispin John Augustine, now I'm doing this way, but for me have a general solution blocking all Form it's better. Thanks anyway!

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Volodya Profile Picture

Volodya 2

#2
tgudwanski Profile Picture

tgudwanski 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans