+ Start a Discussion
Mohd NabeelMohd Nabeel 

How will a user be able to assign a case to himself irrespective of any status

Here is the validation rule, which is working fine, but there is one more thing i want to do that if a reporting agent is assigning any case to itself then it should be able to assign it irrespective of the status.
AND(ISCHANGED(OwnerId), NOT(OR(ISPICKVAL(Status,"Escalated"),ISPICKVAL(Status , "Re-Routed"))),NOT($Profile.Name<>"Reporting Agent"))
from this rule it is also validating that if the user agent is assigning a case to itself then it is firing this, How can i fix this?
Best Answer chosen by Mohd Nabeel
Bhawana Mehta SFDCBhawana Mehta SFDC
Hi,

Why don't you use below validation formula. It will let user assign case to hismelf irrespective of any status.

ISCHANGED(OwnerId) && OwnerId != $User.Id

All Answers

Bhawana Mehta SFDCBhawana Mehta SFDC
Hi,

Why don't you use below validation formula. It will let user assign case to hismelf irrespective of any status.

ISCHANGED(OwnerId) && OwnerId != $User.Id
This was selected as the best answer
Mohd NabeelMohd Nabeel
but when he wants assign to others then it should check the status. If the status are "Escalated" or "Re-Routed" then only he can assign to others otherwise it cannot
Mohd NabeelMohd Nabeel
But of he is assigning a case to himself/herself or taking a case to another user then it should not check any status
Mohd NabeelMohd Nabeel
Hi Bhawana, 
Thanks for the answer i have modified my rule by adding your rule in my original rule now its working fine

OR (AND(ISCHANGED(OwnerId), NOT(OR(ISPICKVAL(Status,"Escalated"),ISPICKVAL(Status , "Re-Routed"))),NOT($Profile.Name<>"Reporting Agent")), ISCHANGED(OwnerId) && OwnerId != $User.Id)