The AL developer preview is still evolving with frequent updates. Follow us on the Dynamics NAV Team Blog for the announcements.
RESET Method (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 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 Method (Record).
This example requires that you create the following global variables and text constants.
|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.