Case workflow formula to notify case owner when an edit has been made - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Barb DowneyBarb Downey 

Case workflow formula to notify case owner when an edit has been made

I have a workflow email alert firing when the formula below is TRUE.

AND
((LastModifiedById <> CreatedById))

It works but I need to also exclude specific case record types(<>). We have 4 that we want to exclude:

0124y000000YbzSAAS
0120e000000YL7RAAW
0120e000000YL7WAAW
0120e000000YL7bAAG

I can't seem to get the Syntax right. Appreciate the schooling :)




 
Best Answer chosen by Barb Downey
Tony TrinhTony Trinh
Hi Barb,

You will need to use the 15 char IDs of the Case Record Types, but it's much cleaner to use the RecordType.Name or RecordType.DeveloperName. You choose which way you would like to approach it:
AND(
LastModifiedById <> CreatedById,
RecordTypeId <> "0124y000000YbzS",
RecordTypeId <> "0120e000000YL7R",
RecordTypeId <> "0120e000000YL7W",
RecordTypeId <> "0120e000000YL7b"
)
or
AND(
LastModifiedById <> CreatedById,
RecordType.Name <> "Name of Record Type 1",
RecordType.Name <> "Name of Record Type 2",
RecordType.Name <> "Name of Record Type 3",
RecordType.Name <> "Name of Record Type 4"
)

All Answers

Tony TrinhTony Trinh
Hi Barb,

You will need to use the 15 char IDs of the Case Record Types, but it's much cleaner to use the RecordType.Name or RecordType.DeveloperName. You choose which way you would like to approach it:
AND(
LastModifiedById <> CreatedById,
RecordTypeId <> "0124y000000YbzS",
RecordTypeId <> "0120e000000YL7R",
RecordTypeId <> "0120e000000YL7W",
RecordTypeId <> "0120e000000YL7b"
)
or
AND(
LastModifiedById <> CreatedById,
RecordType.Name <> "Name of Record Type 1",
RecordType.Name <> "Name of Record Type 2",
RecordType.Name <> "Name of Record Type 3",
RecordType.Name <> "Name of Record Type 4"
)
This was selected as the best answer
Barb DowneyBarb Downey
Thanks so much. I was wayyyyyy over thinking it. 
Subhani PothakamuriSubhani Pothakamuri
I suggest to go with DeveloperName for record types. Also do not hardcode the recordTypeIds in your formula lofic
AND(
LastModifiedById <> CreatedById,
RecordType.DeveloperName <> "DeveloperName of Record Type 1",
RecordType.DeveloperName <> "DeveloperName of Record Type 2",
RecordType.DeveloperName <> "DeveloperName of Record Type 3",
RecordType.DeveloperName <> "DeveloperName of Record Type 4"
)