Validation rule criteria: IF the "Is Owner" field =1, then users shouldn't be able to edit "Commission User ID" nor Territory ID.
OR( (ISCHANGED( Commission_User_Id__c ) || ISCHANGED( TerritoryId__c )) and Text(Is_Owner__c, "1"))
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
You have the syntax wrong, and I strongly recommend you don't mix
|| syntax, as it often leads to confusion. First of all, the proper usage:
logical1,logical2,...with the values that you want evaluated.
Same goes for
OR(logical1, logical2...)and replace any number of logical references with the expressions you want evaluated.
So as far as your
AND expression goes, your first logical expression would be to check
Is_Owner__c="1", and your second logical expression would be an
OR clause to check that neither field has changed. Inside your
OR clause, each expression would be an
AND( Is_Owner__c="1", OR( ISCHANGED(Field1__c), ISCHANGED(Field2__c) ) )