Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Override SystemDefinedShowFiltersButton dialog controls

Posted on by Microsoft Employee

Hey guys, 

I have a small filter icon on the left of the grid on a form with design pattern: Simple List. When I click it, it shows me 2 fields, but I want to override them and display 4-5 fields depending on my requirement.

I have seen that the control name is: SystemDefinedShowFiltersButton, and can be used as a reference to a controlId using #SystemDefinedShowFiltersButton macro. 

I have also read on: https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/user-interface/system-defined-buttons, about registerOverrideMethod() to call additional code to be executed when the system-defined button is clicked.

I am not sure how would I do it, since I can't find where the piece of code is located in existing customizations. I have tried different forms for help, but I guess those customizations aren't there. 

What I want to do? When the user clicks the SysDefinedFilterButton, The dialog shows fields according to my customization.

How do I do it? I don't know

*This post is locked for comments

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Override SystemDefinedShowFiltersButton dialog controls

    Ok. I found a solution. To add fields in SysDefinedFilterButton, add datasource field range (don't set any value) in Form's init method

    Example:

    public void init()
    {
        super();
    
        // This will show Personnel Number named control in SysDefinedFilterPane
        HcmWorker_DS.query().dataSourceTable(tableNum(HcmWorker))
            .addRange(fieldNum(HcmWorker, PersonnelNumber));
    }


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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans