The AL developer preview is still evolving with frequent updates. Follow us on the Dynamics NAV Team Blog for the announcements.
GETFILTERS Method (RecordRef)
Determines which filters have been applied to the table referred to by the RecordRef.
String := RecordRef.GETFILTERS
The RecordRef to use to identify the record in the table on which filters may have been applied.
This method works just like the GETFILTERS Method (Record).
Property Value/Return Value
Filters that have been applied to the table that is referred to by the RecordRef parameter.
The following example opens a table as a RecorRef variable. The variable, RecRef, is used with the GETFILTERS method to retrieve the filters that are applied in the Customer table. If filters are applied, they will be stored in the Filters1 variable. The Filters1 variable does not contain any filters because filters have not been set. Then the SETRECFILTER Method (RecordRef) is used to set the value in the current key of the current record as a filter. The variable Filters2 will now contain No. as a filter. The example requires that you create the following global variables and text constant.
|Text constant name||DataType||ENU value|
|Text000||Text||Filters1 contains : %1 Filters2 contains: %2|
RecRef.OPEN(DATABASE::Customer); Filters1 := RecRef.GETFILTERS; RecRef.SETRECFILTER; Filters2 := RecRef.GETFILTERS; MESSAGE(Text000, Filters1, Filters2);