0

I'm working on a validation rule where I only want the profiles of the system admin and finance to be able to edit certain fields if the type=customer. The following formula works for only letting the system admin edit the fields and all other profiles cannot but it has gotten tricky when trying to add the finance profile too.

Does anyone have any suggestions on how I can include the Finance profile into the following rule?

AND(
$Profile.Name<>"System Administrator",
ISPICKVAL( Type , "Customer"),
OR(
ISCHANGED( Name ),
ISCHANGED( BillingAddress ),
ISCHANGED( Intacct_ID__c ),
ISCHANGED( Payment_Terms__c ),
ISCHANGED( Primary_Bill_To_Location__c ),
ISCHANGED( Primary_Bill_To_Contact__c ),
ISCHANGED( Intacct_Portal_Account__c ))
)

1 Answer 1

1

Depending on what you have named your finance profile, you could consider:

AND(
$Profile.Name<>"System Administrator",
$Profile.Name<>"Finance",
ISPICKVAL( Type , "Customer"),
OR(
ISCHANGED( Name ),
ISCHANGED( BillingAddress ),
ISCHANGED( Intacct_ID__c ),
ISCHANGED( Payment_Terms__c ),
ISCHANGED( Primary_Bill_To_Location__c ),
ISCHANGED( Primary_Bill_To_Contact__c ),
ISCHANGED( Intacct_Portal_Account__c ))
)
3
  • The above rule gave no syntax errors and the system admin was able to edit the fields but profiles that were not system admin or finance were still able to edit the fields. I appreciate the help, do you have any other suggestions?
    – Nate
    Jan 21, 2021 at 16:27
  • go to setup>profiles or query for them, because i suspect your finance profile is named something else. Afterall its a custom profile so its named whatever its named in your org Jan 21, 2021 at 19:57
  • oh and replace "Finance" with whatever its named in your org Jan 21, 2021 at 20:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .