Validation rule to ...
 
Notifications
Clear all

[Solved] Validation rule to check if the owner of a record is active or inactive

2 Posts
1 Users
0 Likes
613 Views
Posts: 205
 CWL
Admin
Issue starter
(@cwl)
Member
Joined: 11 years ago

Need a validation rule to fire if the owner of a Lead record is Active.

Tried this but its firing for both active and inactive. Should only throw the error for Active record owners (users): 

AND(      
  Owner:User.IsActive = true,    
  ISCHANGED(OwnerId)
)

 

Issue Tags
1 Reply
Posts: 205
 CWL
Admin
Issue starter
(@cwl)
Member
Joined: 11 years ago

Solution is to create a Boolean formula field OwnerIsActive__c with the formula Owner:User.IsActive

And use Priorvalue() function as below in the validation rule:

AND(
  PRIORVALUE(OwnerIsActive__c) = true,    
  ISCHANGED(OwnerId)
)
Reply
Share: