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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

How Enable or Disable a lookup field Based on enum value on a dialog form !!

(0) ShareShare
ReportReport
Posted on by 2

I have a Enum Types of Goods with value (Input /Capital Goods) now, I have a lookup field Production order if I chose input Enum value (Input) lookup should be disabled and for Enum value (capital goods) it should be enabled.

I have the same question (0)
  • Suggested answer
    Mohit Rampal Profile Picture
    12,563 Moderator on at
    RE: How Enable or Disable a lookup field Based on enum value on a dialog form !!

    Hi Sachin, You can refer these articles

    theaxapta.blogspot.com/.../how-to-enabledisable-fields-in-dialog.html

    https://wp.me/p1bEiG-go

  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    RE: How Enable or Disable a lookup field Based on enum value on a dialog form !!

    First make these controls auto declaration to yes if it's custom form. Then create a new method making the said condition and get the datasource by

    Table table = table_ds.cursor();

    Then simply call this new method in active and modified of that enum.

  • Suggested answer
    GirishS Profile Picture
    27,825 Moderator on at
    RE: How Enable or Disable a lookup field Based on enum value on a dialog form !!

    Hi Sachin,

    For your scenario - You can add the code on the modified method of the Enum control and based on the current Enum value you can enable disable the other control.

    Similarly you need to add this on active method also.

    Look to the below syntax.

    //check for the enum value
    if(enumvalue = input)
    {
        control.enabled(false);
    }
    else
    {
        control.enabled(true);
    ]

    Thanks,

    Girish S.

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

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

#2
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 636

#3
Martin Dráb Profile Picture

Martin Dráb 553 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans