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 :
Microsoft Dynamics AX (Archived)

Change Enum value on Button Click

(0) ShareShare
ReportReport
Posted on by 8,223

Dear Friends,

I have two tables with enm (No, Yes) , and  need to change that enum value on button click .
default value will be No and when I click button it should changed to Yes.

can anyone guide me how to do that?

Thanks in advance.

Amith Prasanna

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    Current version in your post tag means AX 7 / Dynamics 365 for Operations. I see an AX 2012 R3 tag as well, so remove one of them, because it is confusing.

    Override the clicked() method on your button, and add your logic there to switch the value of the checkbox form control.

    msdn.microsoft.com/.../formcheckboxcontrol.checked.aspx

  • A.Prasanna Profile Picture
    8,223 on at

    My apologies . I changed the tags.

    thanks for your suggestion & I've override cliked() method , but when I click on button

    there was no changes , also there was no errors .I will check my code and update.

    Regards,

    Amith Prasanna

  • Verified answer
    startax Profile Picture
    1,845 on at

    Hi Amith,

    1. You have to change auto declaration property yes of that enum.

    2. Write the code in clicked() method of button click "ComboBox.selection(1);"

    Combobox = enum field name

    Thank You,

  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    Can you please paste your code that you have in the clicked() method? It will not fire the button's event correctly if you have removed the super(); call in the method.

    Also as per Dinkar, have you set auto declaration for the control you would like to toggle?

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans