RE: Rec.ISEMPTY vs Rec.HASRECORDS
Stefano is right, if you iterate for sure you want to use something along the lines of findfirst or findset, depending on what you need to achieve.
My previous suggestion was strictly to the point of what's the most efficient alternative to see if you have records in a record variable, without necessarily doing something with it afterwards, but triggering another event in case no record is found. And the fastest one is a method that doesn't retrieve a record from the database.
Of course considering BC has the Azure platform behind the scenes and assuming that there is no crazy iteration of the code in question, you would assume a find is actually best fit at the end of the day, it won't impact your performance.
I personally prefer using findfirst, or findset, depending on what I want to do after I find the records, but there are situations when using isempty makes perfect sense.
For instance if a certain filtered record.isempty then I may want to create it with an insert.
Cheers,
Robert