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
DumasRoxDumasRox 

Help WFR: Account Status = Active and Track Field Changes

Hello,

Can someone please help me with my criteria?

 

I am trying to create a workflow that will send an email only when the contact status = active and when the profile is not = to "non-us sales"

And company_level__c or general_access__c are changed.

 

However, when I test the formula as I have it listed below, it will fire even when the contact status is = to inactive but only when I make edits to the general_access__c text field.

Do I need to include an OR in between the 2 ISCHANGED commands?

 

 

IF (ISNULL($Profile.CreatedDate), false, true) &&
ISPICKVAL(Contact_Status__c , "Active") &&
NOT ($Profile.Name = "non-us sales") &&
ISCHANGED(Company_Level__c) ||
ISCHANGED (General_Access_Notes__c)

 

Your help is appreciated!

 

~Rox

 

Best Answer chosen by Admin (Salesforce Developers) 
ericszulcericszulc

Yeah, the operators are probably executing in a different order than you expect.

 

I would try:

 

AND(

IF (ISNULL($Profile.CreatedDate), false, true),
ISPICKVAL(Contact_Status__c , "Active"),
NOT ($Profile.Name = "non-us sales"),
OR(

ISCHANGED(Company_Level__c),
ISCHANGED (General_Access_Notes__c)

)

)

 

or this might work:

 

IF (ISNULL($Profile.CreatedDate), false, true) &&
ISPICKVAL(Contact_Status__c , "Active") &&
NOT ($Profile.Name = "non-us sales") &&
(ISCHANGED(Company_Level__c) ||
ISCHANGED (General_Access_Notes__c))

All Answers

ericszulcericszulc

Yeah, the operators are probably executing in a different order than you expect.

 

I would try:

 

AND(

IF (ISNULL($Profile.CreatedDate), false, true),
ISPICKVAL(Contact_Status__c , "Active"),
NOT ($Profile.Name = "non-us sales"),
OR(

ISCHANGED(Company_Level__c),
ISCHANGED (General_Access_Notes__c)

)

)

 

or this might work:

 

IF (ISNULL($Profile.CreatedDate), false, true) &&
ISPICKVAL(Contact_Status__c , "Active") &&
NOT ($Profile.Name = "non-us sales") &&
(ISCHANGED(Company_Level__c) ||
ISCHANGED (General_Access_Notes__c))

This was selected as the best answer
DumasRoxDumasRox

ugh, I was so close.

Your solution makes perfect sense. I went on to create 9 more without error. :)

Thank you ericzulc!

ericszulcericszulc

It's always something small. Glad it worked.