+ Start a Discussion
sml9099sml9099 

Need Help: Validation Rule is not executing as desired

Hey Guys, 

 

we have a validation rule on (xyz__c) field.. It's like this " whenever any change to a field (xyz__c) is made , users need to select the reasons in reason__c field.  But it is prompting the users to select the reasons (reason__c) whenever any change is made to any field on the that record. In short , validation rule should be valid only for xyz__c but it is working on all fields. Below is the validation rule. 

 

AND( 
$Profile.Id <> "00e70000000owrS", 
ISCHANGED(xyz__c ), 
TEXT(reason__c)="" 
)

 

 

Best Answer chosen by Admin (Salesforce Developers) 
AgiAgi

Hi,

 

can you try this

AND(

$Profile.Id <> "00e70000000owrS", 
ISCHANGED(xyz__c ),
NOT(ISCHANGED(reason__c)))

All Answers

AgiAgi

Hi,

 

can you try this

AND(

$Profile.Id <> "00e70000000owrS", 
ISCHANGED(xyz__c ),
NOT(ISCHANGED(reason__c)))

This was selected as the best answer
sml9099sml9099

Hi , 

 

Thanks for your reply. Seems like , it worked.

 

Thanks