+ Start a Discussion
Cris9931Cris9931 

why my list is empty here?

User-added image
Best Answer chosen by Cris9931
AnudeepAnudeep (Salesforce Developers) 
Hi Cristian, 

Took a look at the screenshot and the debug logs. It is expected

At line 452 you are not populating ownerIds, you have just defined the set 
Set<String> ownerIds = new Set<String>();

However, at line 458 you have populated the ownerIds
 
ownerIds.add(sts.OwnerId);

Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you