Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

how show group depending on selection

(0) ShareShare
ReportReport
Posted on by 2,030

Greeting 

here i created new custom group (absence as you see inside red square ) & (leave as you see inside green square )

0652.case1.JPG

6180.3.PNG

and i already make both property visible false as default 

and i want them visible or not visible depending on selection of Case Category

so i created method (modified) on Case Category

5432.1.PNG

and here's my code to show those group depending on selection of Case Category

7673.2.PNG

and after that my condition stil not showing groups depending on selection of Case Category 

i did debug but debug show me empty and no error 

*This post is locked for comments

  • Martin Dráb Profile Picture
    Martin Dráb 231,409 Most Valuable Professional on at
    RE: how show group depending on selection

    Declaring a new empty variable wouldn't help you anyway, because it wouldn't contain any data. If the datasource isn't called "caseCatHierachyDetail", look into the form definition and find the correct name.

  • mohammed.mqi Profile Picture
    mohammed.mqi 2,030 on at
    RE: how show group depending on selection

    thanks for replay

    when i instead to (caseCatHierachyDetail.CaseCategory) it's asked my to declare caseCatHierachyDetail so i did it

    CaseCatHierachyDetail   caseCatHierachyDetail;

    and stil asked me to declare please if you have something like that to guide me to write my code please provide me

    i really confused about that

    and i really started debugging my code using the debugger and seam there's no error

  • Martin Dráb Profile Picture
    Martin Dráb 231,409 Most Valuable Professional on at
    RE: how show group depending on selection

    There are several problems in your code, the most critical one is that you have business data written in code. Your code would not work if users choose different category type names.

    Also, you should refer to table fields rather than to individual controls (caseCatHierachyDetail.CaseCategory instead of CaseCatHierachyDetail_CaseCategory.valueStr()).

    And you'll your code to be called from active() as well, therefore you must extract it to a separate method.

    Anyway, regarding your actual problem: please start by debugging your code using the debugger.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans