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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Want to enable or disbale a button on form based on a enum value

(0) ShareShare
ReportReport
Posted on by

Hi all, 

i want to enable/disbale a button on a from based on Enum value. but activate method was already used on the form. can someone please provide some information how to achieve this?

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    Hi Nara Sheshu,

    where is this enum stored? Is it in the table that is shown on the form? If yes, then indeed the active method of the form data source is the correct place for triggering your code.

    What do you mean by "activate method was already used on the form"?

    Quite often there's a method called "updateDesign" on the form, and this method is called from the active method of the form data source. I recommend to do this - then the code is easy to read and maintain, and you don't clutter the active method with a lot of code.

  • Suggested answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    What do you mean by already used?

    If the button's enable/disable property is tied to a different condition, you need to review the code and combine the conditions.

  • Nara Sheshananda Profile Picture
    on at

    Active method is used by other condition on the form.

  • Suggested answer
    Xusheng Profile Picture
    on at

    Hi,

    Maybe you need merge the logic to the same method. Hope this can help you.

  • Suggested answer
    AliGul Profile Picture
    66 on at

    hi,

    you can always use form datasource active method for this logic and if you want to use this logic based on some specific condition then you can write your logic at the end of this method, means after all system's logic write your logic.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 584 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 499 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 254 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans