You need to sign in to do that
Don't have an account?
darreln
workflow rule logic - test for multiple record types
Hello all,
I currently have the following logic in a workflow rule to determine when to send out an email alert:
AND (
RecordTypeId <> "012C0000000CCTo",
ISCHANGED ( Requested_Dev_Date__c ),
(
OR
(ISPICKVAL (StageName , "6.5 Process with Signature" ),
(ISPICKVAL (StageName , "6.3 Process without Signature" ))
)))
I now have a need to test for more than one record type ID, while the rest of the logic would stay the same. How do I best accomplish this code? Is the right approach a CASE statement, or IF? How would this be structured?
I currently have the following logic in a workflow rule to determine when to send out an email alert:
AND (
RecordTypeId <> "012C0000000CCTo",
ISCHANGED ( Requested_Dev_Date__c ),
(
OR
(ISPICKVAL (StageName , "6.5 Process with Signature" ),
(ISPICKVAL (StageName , "6.3 Process without Signature" ))
)))
I now have a need to test for more than one record type ID, while the rest of the logic would stay the same. How do I best accomplish this code? Is the right approach a CASE statement, or IF? How would this be structured?
AND(
ISCHANGED(Requested_Dev_Date__c),
OR(
RecordTypeId = "INSERT RECORD TYPE ID HERE",
RecordTypeId = "INSERT NEXT RECORD TYPE ID HERE",
RecordTypeId = "INSERT NEXT RECORD TYPE ID HERE"),
OR(
ISPICKVAL (StageName. "6.5 Process with Signature"),
ISPICKVAL (StageName, "6.3 Process without Signature"))
)
This should allow for 3 Record Types, and you can add additional lines for any additional RT's if more than three are needed. This should help out. If this works for you, please mark as the best answer.
Shawn
All Answers
AND(
ISCHANGED(Requested_Dev_Date__c),
OR(
RecordTypeId = "INSERT RECORD TYPE ID HERE",
RecordTypeId = "INSERT NEXT RECORD TYPE ID HERE",
RecordTypeId = "INSERT NEXT RECORD TYPE ID HERE"),
OR(
ISPICKVAL (StageName. "6.5 Process with Signature"),
ISPICKVAL (StageName, "6.3 Process without Signature"))
)
This should allow for 3 Record Types, and you can add additional lines for any additional RT's if more than three are needed. This should help out. If this works for you, please mark as the best answer.
Shawn
OR(
RecordTypeId <> "012C0000000CCTo",
RecordTypeId <> "012C0000000kxMt",
RecordTypeId <> "012C0000000kxMs",
RecordTypeId <> "012C0000000kxMq",
RecordTypeId <> "012C0000000kxMr",
AND(ISCHANGED ( Requested_Dev_Date__c )),
OR
(ISPICKVAL (StageName , "6.5 Process with Signature" ),
(ISPICKVAL (StageName , "6.3 Process without Signature" ))))
Does the order of ORs and ANDs matter in this context, or is either approach valid?
Shawn