Skip to main content
I need to lock an opportunity for specific profiles when a picklist: "Level of Engagement" is set to value: "Do Not Market".  I have tried validation rules which aim to say: if the value of "Level of Engagment" = "Do Not Market", the error shall fire with any attempt to edit the record.

 

I have tried a couple approaches:

 

1)    

 

AND(ISPICKVAL(Level_of_Engagement__c, "Do Not Market"),

NOT($

Profile.Name

= "API Only"),

NOT($

Profile.Name

= "Support and Release"),

NOT($

Profile.Name

= "System Administrator"),

NOT($

Profile.Name

= "Developer"),

NOT($

Profile.Name = "QA Admin"))

 

 

In this case I receive the error message even the very first time I change the value to "Do Not Market", which is not helpful because the I want the value to be "Do Not Market" and THEN have the error fire if there are any edits.

 

 

I've also tried...

 

2)

 

AND(PRIORVALUE(Level_of_Engagement__c) = "Do Not Market", 

NOT($

Profile.Name

= "API Only"), 

NOT($

Profile.Name

= "Support and Release"), 

NOT($

Profile.Name

= "System Administrator"), 

NOT($

Profile.Name

= "Developer"), 

NOT($

Profile.Name

= "QA Admin"))

In this case the validation rule seems to be benign because nothing is happening.  Thanks for any help!

5 Antworten
  1. 28. Aug. 2012, 02:30
    Alex try this, I just test in my instance and it work.

     

    AND(

     

    ISPICKVAL( PRIORVALUE( Level_of_Engagement__c ), "Do Not Market")

     

    NOT($Profile.Name = "API Only"),

     

    NOT($Profile.Name = "Support and Release"),

     

    NOT($Profile.Name = "System Administrator"),

     

    NOT($Profile.Name = "Developer"),

     

    NOT($Profile.Name = "QA Admin"))

     

    if this work for you, come on back and marking it as "Best Answer".  
0/9000