Scope: managed applications, mobile applications, and ordinary applications.
1. If you need to check whether a query result is empty, employ the IsEmpty method. Otherwise, it will take time to fetch the data and save the result-set.
Incorrect:
Selection = Query.Execute().Select();
If Selection.Next() Then
Return TRUE;
Else
Return FALSE;
EndIf;
Correct:
Return NOT Query.Execute().IsEmpty()