I was wondering what would be the most efficient way to do the following.
The Account object is the parent of the Order object.
The Order object has a field called 'Status'.
The Status field, a drop down field, has several values.
The Account can have many Order records (one-to-many relationship).
I need to check for every Account that I pass from a Set collection the following.
If all Order records that are children of an Account have the
Status = 'Completed', move those Accounts to another Set collection.
What will be the best way to do this?