Salesforce famously doesn’t support assigning tasks to records when the record is in a queue – this has been on the ‘wishlists’ of many Salesforce admins for a number of years now.

If a task is created against a lead that is in a queue, it gets sent to the system admin. Not ideal!

The easiest way around this is to change the workflow that spawns the task. We can check the prefix of the owner: queues tend to have a prefix of ‘OOG’ in Salesforce, users have an ID prefix of ‘005’.

Here is the formula for the workflow that will spawn a task if the lead is in a queue, and the lead is ‘Hot’:

AND( Begins(OwnerId, '005') ,ISPICKVAL(Rating, 'Hot'))