+ Start a Discussion
OssieOssie 

Prevent user from editing a record if field contains specific value

Hi,

Is it possible to prevent users from editing a record based on a specfic value in a field?  
For example users should not be able to edit a opportunity record if Stage equals 'Won OR Lost'?

Would appreciate any help!!
Best Answer chosen by Ossie
Vatsal KothariVatsal Kothari
Hi Ossie,

Yes you can do this using Validation Rule.

You can create Validation Rule on Opportunity (Setup --> Customize --> Opportunities --> Validation Rule)

Create New Validation rule with following formula :
IF(OR(ISPICKVAL(PRIORVALUE(StageName),"Closed Won"),ISPICKVAL(PRIORVALUE(StageName),"Closed Lost")) , true, false)
If this solves your problem, kindly mark it as the best answer.

Thanks,
Vatsal

All Answers

Vatsal KothariVatsal Kothari
Hi Ossie,

Yes you can do this using Validation Rule.

You can create Validation Rule on Opportunity (Setup --> Customize --> Opportunities --> Validation Rule)

Create New Validation rule with following formula :
IF(OR(ISPICKVAL(PRIORVALUE(StageName),"Closed Won"),ISPICKVAL(PRIORVALUE(StageName),"Closed Lost")) , true, false)
If this solves your problem, kindly mark it as the best answer.

Thanks,
Vatsal

This was selected as the best answer
suresh dupadasuresh dupada
Hi Ossie,

create the validation rule on Opportunity by using the following formula

(OR(ISPICKVAL(PRIORVALUE(StageName),'Closed Won'),ISPICKVAL(PRIORVALUE(StageName),'Closed Lost')))


I am verified this formula 'Through error message as u like ex:Record is in ReadOnly mode'

check your self if it correct then marks it best answer
OssieOssie
Thank You both.
worked perfectly.