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)

disable and enable controls depending on selection

(0) ShareShare
ReportReport
Posted on by 2,050

Greetings 

case1.JPG

i'v created a new controls and i want them appear or disappear depending on selection of  Case Category

So that when he chooses an (absence) he shows the absence group and hides the leave group
If he chooses leave, the leave group appears and hides the absence group
If no one chooses, the two groups are hidden

 i crated modified method on (Case Category) controls to check that but that's code not working when start Load form event (i mean when create)

how can i do that?!!

*This post is locked for comments

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

    Modified method is called only when the control is modified.

    In addition to that you need to call your logic from the active method of the form data source. That's called every time the active record changes.

  • mohammed.mqi Profile Picture
    2,050 on at

    ok you mean i must add the code to active method of the form data source

    sorry but i did this also stil nothing change is there problem in my code!?

    case3.JPG

    case3.JPG

  • nmaenpaa Profile Picture
    101,166 Moderator on at

    Could you maybe share any more details about what happens when the modified method is called? Does it go into the if statement?

    Also do you call this same code from the active method of the data source as well? 

  • mohammed.mqi Profile Picture
    2,050 on at

    thanks for replay

    but on modified when i chose leave

    nothing leave group not shown even when i chose absence

  • nmaenpaa Profile Picture
    101,166 Moderator on at

    Did you debug it? What information did you learn from debugging?

    What if you try to print to infolog the value of the field (the same value that you use in your if statement)? What does it print to infolog?

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
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
Basit Profile Picture

Basit 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans