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)

Disabling a button in a form A when form B is open

(0) ShareShare
ReportReport
Posted on by 126

Hi Guys,

I have 2 forms, when I click form A the button should be disabled when form B shows up, Ill do this already, my question is where I can put a method  to make the button disabled  even form A is opened again in formlist.

is there a way on this?

thanks in advance

*This post is locked for comments

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

    Hi Kenneth Sy,

    You can use global cache axforce.wordpress.com/.../how-to-store-an-object-state-using-global-cache to save a flag there that form B is opened and check this flag when you open form A to disable that button, then you need to clear flag when you close from B, so next time you open form A button will be enabled again.

  • Douglas Noel Profile Picture
    3,907 on at

    Hi,

    should the button(s) on the 'second' (any further) FormA instances be  reenabled if closing FormB (called from the first FormA)?

    Or can they stay disabled?

    Think you can use either an 'global' reference counter in infolog globalcache, increasing/decreasing the counter on opening/closing FormA (and disable the button always starting from the second FormA instance (even if the first hasn't open FormB)

    or/and

    use some kind of list or set of buttonreferences (to Button in FormA) - also infolog globalcache - filled/removed on opening/closing FormA and enable all the buttons on closing formB

    Only some thoughts

    regards Douglas

  • Josh_ Profile Picture
    126 on at

    Hello guys,

    @ievgen - Will I create a method in Form A using the "Global Cache"?.

    @Douglas - Yes, form A is reenabled when closing form B.

    actually I dont know how to apply Global cache, just new to coding, can you shed me some light on how to implement it on a form?.

    I gladly appreciate your answers, thank you.

  • Jie G Profile Picture
    Microsoft Employee on at

    Maybe you can take a look at: msdn.microsoft.com/.../formrun.setactive.aspx

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
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans