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
lindawong1.3904064808924868E12lindawong1.3904064808924868E12 

Need help with workflow formula

I need notification to fire an email with 3 criterias:
1) if account is A or B or C
2) if Lead generator is AK or BG or CS
3) if there is information on the criterias.

AND (OR(ISPICKVAL( Account.Type , "A"),
ISPICKVAL( Account.Type , "B"),
ISPICKVAL( Account.Type , "C"),

OR(ISPICKVAL( Lead_Generator_Detail__c, "AK"),
ISPICKVAL ( Lead_Generator_Detail__c ,"BG"),
ISPICKVAL ( Lead_Generator_Detail__c , "CS"),

(OR(NOT(ISBLANK( Account.Payment_Terms__c)),
NOT (ISBLANK ( Account.Override__c )),
NOT(ISBLANK( Account.Pricing__c )),
NOT(ISBLANK( Account.Remarks__c ))) ))))

However, according to my manager this workflow has the brackets wrongly input, can anyone please help.
Thanks.
Best Answer chosen by lindawong1.3904064808924868E12
ShashForceShashForce
Hi Linda,

This should work better. My changes are in bold:

AND (OR(ISPICKVAL( Account.Type , "A"),
ISPICKVAL( Account.Type , "B"),
ISPICKVAL( Account.Type , "C")),

OR(ISPICKVAL( Lead_Generator_Detail__c, "AK"),
ISPICKVAL ( Lead_Generator_Detail__c ,"BG"),
ISPICKVAL ( Lead_Generator_Detail__c , "CS")),

(OR(NOT(ISBLANK( Account.Payment_Terms__c)),
NOT (ISBLANK ( Account.Override__c )),
NOT(ISBLANK( Account.Pricing__c )),
NOT(ISBLANK( Account.Remarks__c ))))

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank

All Answers

ShashForceShashForce
Hi Linda,

This should work better. My changes are in bold:

AND (OR(ISPICKVAL( Account.Type , "A"),
ISPICKVAL( Account.Type , "B"),
ISPICKVAL( Account.Type , "C")),

OR(ISPICKVAL( Lead_Generator_Detail__c, "AK"),
ISPICKVAL ( Lead_Generator_Detail__c ,"BG"),
ISPICKVAL ( Lead_Generator_Detail__c , "CS")),

(OR(NOT(ISBLANK( Account.Payment_Terms__c)),
NOT (ISBLANK ( Account.Override__c )),
NOT(ISBLANK( Account.Pricing__c )),
NOT(ISBLANK( Account.Remarks__c ))))

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank
This was selected as the best answer
lindawong1.3904064808924868E12lindawong1.3904064808924868E12
Hi Shashank,

Thanks so much, it works.