+ Start a Discussion
Amitkumar15Amitkumar15 

Valiadtion Rule for profile

i have a validation which should restrict certain profile from modifying fileds.

 

I am using below formula but this is not working perfectly. when i am logged in as profile1 and creating record , i am getting valiadtion error. i want to resticts only during updation and not creation.

 

AND(NOT(
OR(
ISCHANGED(Close_Date__c),
ISCHANGED(Status__c),
ISCHANGED(Delivery_Date__c)
)),
OR(
($Profile.Name="profile1"),
($Profile.Name="profile2")
),
NOT((ISNEW()))
)

Best Answer chosen by Admin (Salesforce Developers) 
@anilbathula@@anilbathula@
Hi

Try this:-
AND(ISCHANGED(Close_Date__c),
ISCHANGED(Status__c),
ISCHANGED(Delivery_Date__c),OR(($Profile.Name="profile1"),
($Profile.Name="profile2")))

All Answers

@anilbathula@@anilbathula@
Hi

Try this:-
AND(ISCHANGED(Close_Date__c),
ISCHANGED(Status__c),
ISCHANGED(Delivery_Date__c),OR(($Profile.Name="profile1"),
($Profile.Name="profile2")))
This was selected as the best answer
anvesh@force.comanvesh@force.com

On which Obj that you are specifiyng this validation rule