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.
Parameters
- Record
-
Type: Record
The record that you want to reset.
Example
This example requires that you create the following
variables and text constants in the C/AL Globals window.
Variable name |
DataType |
Subtype |
CustomerRec
|
Record
|
Customer
|
Count1
|
Integer
|
|
Count2
|
Integer
|
|
Text constant |
ENU value |
Text000
|
Before RESET: %1.\
|
Text001
|
After RESET: %2.
|
|
Copy Code |
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.
See Also