RESET Function (Record)
Removes all filters, including any special filters set by MARKEDONLY, and changes the current key to the primary key. Also removes any marks on the record and clears any C/AL variables on the record.
The record that you want to reset.
RESET does not reset filters in filter group 1. For more information about filter groups, see FILTERGROUP Function (Record).
This example requires that you create the following variables and text constants in the C/AL Globals window.
|Text000||Before RESET: %1.\|
|Text001||After RESET: %2.|
CustomerRec.SETFILTER("No.", '10000'); CustomerRec.SETRANGE("Salesperson Code", 'PS'); CustomerRec.MARKEDONLY(TRUE); Count1 := CustomerRec.COUNT; // Count marked customers in the range. CustomerRec.RESET; Count2 := CustomerRec.COUNT; // Count all customers. MESSAGE(Text000 + Text001, Count1, Count2);
Messages similar to the following are displayed:
Before RESET: 0
After RESET: 68
The example shows that RESET removed all filters.