D365 Business Central : Selection Filter Management

G/L Account Totaling field

Ever heard of SelectionFilterManagement codeunit ? It’s a centralized codeunit that is used to built up filter string based on multiple selected records on the page.

An example of usage of SelectionFilterManagement codeunit can be seen on G/L Account Card under Totaling field. When you click on Assist Edit button on Totaling field, the G/L Account List lookup page will appear, you then select multiple records and click OK. The lookup page will return the filter string in the Totaling field. Nice.

So how do we implement this ? You first need to create GetSelectionFilter() procedure under your lookup page. Below is the example from G/L Account List page.

After that, you just need to call the GetSelectionFilter procedure after returning LookupOK from the lookup page. Pretty straightforward.

The SelectionFilterManagement codeunit supports some important tables, such as Customer, Vendor, Item, Resource, GL Account, etc. You can also use RecordRef as well.

No need to use SetSelectionFilter and looping through the records again.

thatnavguy

Experienced NZ-based NAV Developer and Consultant with 15+ years of experience leading multiple IT projects, performing business analyst, developing, implementing, and upgrading Dynamics NAV and Business Central. Passionate to deliver solution that focuses on user-friendly interface while keeping high standard of compliance with the needs.

You may also like...

1 Response

  1. 14 January 2022

    […] Selection Filter Management […]

Leave a Reply

Your email address will not be published. Required fields are marked *