function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Priyadharshini SundaramPriyadharshini Sundaram 

Can we prevent a case assignment to a user who is not currently logged in to salesforce

how to avoid the case assigned to a user who is not currently logged in to salesforce using validation rules?
Sumeet_ForceSumeet_Force
Hi Priya,
Using point-click, there is no option in the UI. However, based on record creation/modification, i..e triggers , you should be able to do that easily.
sumit singh 37sumit singh 37
reate a formula field in the case that assign value of   Current user id .
then in the case assignment rule use the formula  
($User.Id== formula field in case )

create rule for each user with same formula
sumit singh 37sumit singh 37

just create assignment rule for all user like

rule 1 : ($User.Id== 'id of First user ' )  assign to First user
rule 2 : ($User.Id== 'id of Second user ' )  assign to Second user  etc.

DebadyutiDebadyuti
There is no way to say which user is logged in even it's Active .There need to be a checkbox as isLoggedIn in User record and that can easily solve this issue.I added this idea : https://success.salesforce.com/ideaView?id=08730000000LjKRAA0  .Please vote for it.
venkat-Dvenkat-D
There is no direct way to identify this. But one approximate solution can be to do like this. 
Get lastlogin date of the current user. keep session times out after to 15 minutes that way user will be forced to login after 15 minutes after being inactive. use trigger to see if user has logged in today so that cases wont be assigned to inactive user. there is no way to prevent cases from being assigned to inactive users in that 15 min window. its not exact but should work may be 70-80% of time.
Z man0Z man0
I know this is a late response to this question. But I would like to suggest Omni Channel for this scenario which will assign cases from queues to users based on their availability and priority of the case. Its a cool feature in salesforce!