function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mabbaticchiomabbaticchio 

Formula restrictions

Can anyone tell me how to restrict these 2 formulas so that the profile called "API Only" will ignore these formulas.  I want to restrict my users from modifying things, however, my Scribe integration needs access to modify the opportunities if they are modified on the back end system.  These are the 2 formulas used in my validation rules.

If someone can just paste the complete formulas with the above request in place, that would be much appreciated.

 

First One:

 

AND(OR(ISPICKVAL(StageName, "Closed Won"),ISPICKVAL(StageName, "Closed Lost")),Number_Of_Line_Items__c <PRIORVALUE(Number_Of_Line_Items__c) )

 

Second One:

 

OR(ISPICKVAL(Opportunity.StageName, "Closed Won"), ISPICKVAL(Opportunity.StageName, "Closed Lost"))

StephenBStephenB

How about this:

 

IF ( $Profile.Name != "API Only",  <original formula>, false )

 

??

mabbaticchiomabbaticchio

Thanks so much.

That works.

Can you tell me the correct syntax for adding another profile to the exception.

For example, I want the exception to be for API Only as well as System Administrators.

 

StephenBStephenB

You already had the answer from your previous formula! AND's and OR's...

 

IF ( AND ($Profile.Name != "API Only", $Profile.Name != "System Administrator"), <formula>, false )

 

You could always do the opposite:

 

IF ( OR ( $Profile.Name = "API Only", $Profile.Name = "System Administrator"), false, <formula> )

 

 

S