You need to sign in to do that
Don't have an account?

Valiadtion rule is not working
I have valiadtion rule which should allow 2 profiles to allow changes to only 3 fields.
below is rule but this is not working when i am changing others fields along with fields which is mentione din validation rule:
AND(NOT(OR(
ISCHANGED(Close_Date__c),
ISCHANGED(Status__c),
ISCHANGED(Delivery_Date__c)
)),
OR(
($Profile.Name="Profile1"),
($Profile.Name="Profile2")
))
Any help on this...Its Urgent...
In that case you have to reformulate your formula to check if fields that should NOT be changed are changing.
AND(
OR
(
ISCHANGED(field_that_shouldn_be_changed_1),
ISCHANGED(field_that_shouldn_be_changed_2),
.....
)
,
OR
(
$Profile.Name="Profile1",
$Profile.Name="Profile2"
)
)
By the way: why don't you put this requirement into profile field level security?
All Answers
AND(
OR(
ISCHANGED(Close_Date__c),
ISCHANGED(Status__c),
ISCHANGED(Delivery_Date__c)
),
$Profile.Name<>"Profile1",
$Profile.Name<>"Profile2"
)
MarkoLamot. Am I reading that right? We want to throw a validation erro if any of those three fields changed AND the user is not Profiel1 AND not Profile2?
Yes, that's amitkuram wants "should allow 2 profiles to allow changes to only 3 fields.".
Is he?
Or he maybe want that those two profiles are allowed to change only these three fields. Well, than my formula is not OK. But in that case, why put this in validation rule. It's more appropiate to lock other fields via field level security.
I would have thought it needed an OR between the profiles since no one will ever be Profile1 AND Profile2. What am I missing?
it will throw an error if user with profile3 will change any of those three fields (what I thought it was the requrement; but I'm not sure anymore):
profile3 is not equal to profile1 (TRUE) AND profile3 is not equal to profile2 (TRUE) AND if fields change (TRUE) -> TRUE -> Error
Thank you Ryan and Morkol for your response.
My requirement is to allow profile1 and profile2 to update only 3 fields(Close_Date__c,Status__c,Delivery_Date__c).
and this validation rule is not working..
In that case you have to reformulate your formula to check if fields that should NOT be changed are changing.
AND(
OR
(
ISCHANGED(field_that_shouldn_be_changed_1),
ISCHANGED(field_that_shouldn_be_changed_2),
.....
)
,
OR
(
$Profile.Name="Profile1",
$Profile.Name="Profile2"
)
)
By the way: why don't you put this requirement into profile field level security?
Those 2 profiles can enter values in those 3 fields while creating record but they can't update it later.
can this be achieve from FLS?
FLS doesn't allow this level of granularity. Can you please mark MarkoLamot's answer as the solution if it's working for you now? Thanks!