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)

Override SystemDefinedShowFiltersButton dialog controls

(0) ShareShare
ReportReport
Posted on by

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
    on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans