SETRANGE
void SETRANGE(string FieldName, object FromValue = null, object ToValue = null);
Use this function to set a filter.
Customer:SETRANGE('Code','10000');
Sets a filter to value 10000
Customer:SETRANGE('Code','10000','20000');
Sets a filter from 10000 to 20000
Customer:SETRANGE('Code');
Clears filter in field Code.