BC: How to add a request/filter page for the list page (FilterPageBuilder Data Type)

                                   


Stores filter configurations for a filter page. A filter page is a dynamic page type that contains one or more filter controls that enables users to set filters on fields of the underlying tables.

Yes, it is possible, of course you can create a new Report (ProcessingOnly) to do this . This time we use FilterPageBuilder Data Type.

https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/filterpagebuilder/filterpagebuilder-data-type


The following methods are available on instances of the FilterPageBuilder data type.

Method name

Description

AddField(Text, Any [, Text])

Adds a table field to the filter control for a table on filter page.

AddField(Text, FieldRef [, Text])

Adds a table field to the filter control for a table on filter page.

AddFieldNo(Text, Integer [, Text])

Adds a table field to the filter control for a table on the filter page.

AddRecord(Text, Record)

Adds a filter control for a table to a filter page. The table is specified by a record data type variable that is passed to the method.

AddRecordRef(Text, RecordRef)

Adds a filter control for a table to a filter page. The table is specified by a RecordRef variable that is passed to the method. This creates a filter control on the filter page, where users can set filter table data.

AddTable(Text, Integer)

Adds filter control for a table to a filter page.

Count()

Gets the number of filter controls that are specified in the FilterPageBuilder object instance.

GetView(Text [, Boolean])

Gets the filter view (which defines the sort order, key, and filters) for the record in the specified filter control of a filter page. The view contains all fields in the filter control that have a default filter value.

Name(Integer)

Gets the name of a table filter control that is included on a filter page based on an index number that is assigned to the filter control.

PageCaption([Text])

Gets or sets the FilterPageBuilder UI caption. Defaults to the resource text if not explicitly set.

RunModal()

Builds and runs the filter page that includes the filter controls that are stored in FilterPageBuilder object instance.

SetView(Text, Text)

Sets the current filter view, which defines the sort order, key, and filters, for a record in a filter control on a filter page. The view contains all fields that have default filters, but does not contain fields without filters.

 

The key method is RunModal(), but does it feel a bit complicated? Don’t worry, let’s look at a few examples together.

1. Use different methods to add filters for the two tables. AddTable() method, AddRecord() method and Addfield() method






Test Video

                


.

      


Comments

Popular posts from this blog

Generate QR Code in Business Central (On-Prime) Version

Download PDF Files as Compress Zip File in Business Central

Business central Sort Variables & Sort Triggers