Skip to main content
added 141 characters in body
Source Link
Kris Goncalves
  • 22.8k
  • 8
  • 35
  • 72

There's some good resources:

enter image description here

There's twothree things within your example that is off:

  1. Parenthesis - if you want all conditions met, make sure they're all within the AND function
AND (
    ..everything here...
)
  1. Email Status is a picklist field and CONTAINS works on text. You'll need to convert the field value into text using TEXT().
  2. Your original formula used CONTAINS correctly (but your additions did not) and the same format/syntax applies even if using a field instead of a custom metadata value.

CONTAINS should be in the format of CONTAINS(text, compare_text) . If that text is a field, then it's just CONTAINS(fieldName, compare_text).

AND(
$CustomMetadata.Process_Builder_Bypass__mdt.Email_Auto_Update_Provided_To_Customer.Bypassed__c,
CONTAINS($CustomMetadata.Process_Builder_Bypass__mdt.Email_Auto_Update_Provided_To_Customer.Profiles__c, $Profile.Name),
CONTAINS(TEXT([EmailMessage].Parent.Status), "TR/CR"),
CONTAINS([EmailMessage].Subject, "_TR_CR_")
)

There's some good resources:

enter image description here

There's two things within your example that is off:

  1. Parenthesis - if you want all conditions met, make sure they're all within the AND function
AND (
    ..everything here...
)
  1. Your original formula used CONTAINS correctly (but your additions did not) and the same format/syntax applies even if using a field instead of a custom metadata value.

CONTAINS should be in the format of CONTAINS(text, compare_text) . If that text is a field, then it's just CONTAINS(fieldName, compare_text).

AND(
$CustomMetadata.Process_Builder_Bypass__mdt.Email_Auto_Update_Provided_To_Customer.Bypassed__c,
CONTAINS($CustomMetadata.Process_Builder_Bypass__mdt.Email_Auto_Update_Provided_To_Customer.Profiles__c, $Profile.Name),
CONTAINS([EmailMessage].Parent.Status, "TR/CR"),
CONTAINS([EmailMessage].Subject, "_TR_CR_")
)

There's some good resources:

enter image description here

There's three things within your example that is off:

  1. Parenthesis - if you want all conditions met, make sure they're all within the AND function
AND (
    ..everything here...
)
  1. Email Status is a picklist field and CONTAINS works on text. You'll need to convert the field value into text using TEXT().
  2. Your original formula used CONTAINS correctly (but your additions did not) and the same format/syntax applies even if using a field instead of a custom metadata value.

CONTAINS should be in the format of CONTAINS(text, compare_text) . If that text is a field, then it's just CONTAINS(fieldName, compare_text).

AND(
$CustomMetadata.Process_Builder_Bypass__mdt.Email_Auto_Update_Provided_To_Customer.Bypassed__c,
CONTAINS($CustomMetadata.Process_Builder_Bypass__mdt.Email_Auto_Update_Provided_To_Customer.Profiles__c, $Profile.Name),
CONTAINS(TEXT([EmailMessage].Parent.Status), "TR/CR"),
CONTAINS([EmailMessage].Subject, "_TR_CR_")
)
added 400 characters in body
Source Link
Kris Goncalves
  • 22.8k
  • 8
  • 35
  • 72

There's twosome good resources:

enter image description here

By searching through the functions and clicking insert, you'll see the format for functions.

There's two things within your example that is off:

  1. Parenthesis - if you want all conditions met, make sure they're all within the AND(..everything here...)
  2. Your original formula used CONTAINS correctly (but your additions did not) and the same format/syntax applies even if using a field instead of a custom metadata value.function
AND (
    ..everything here...
)
  1. Your original formula used CONTAINS correctly (but your additions did not) and the same format/syntax applies even if using a field instead of a custom metadata value.

CONTAINSCONTAINS should be in the format of CONTAINS(text, compare_text) . If that text is a field, then it's just CONTAINS(fieldName, compare_text).

AND(
$CustomMetadata.Process_Builder_Bypass__mdt.Email_Auto_Update_Provided_To_Customer.Bypassed__c,
CONTAINS($CustomMetadata.Process_Builder_Bypass__mdt.Email_Auto_Update_Provided_To_Customer.Profiles__c, $Profile.Name),
CONTAINS([EmailMessage].Parent.Status, "TR/CR"),
CONTAINS([EmailMessage].Subject, "_TR_CR_")
)

There's two good resources:

enter image description here

By searching through the functions and clicking insert, you'll see the format for functions.

There's two things within your example that is off:

  1. Parenthesis - if you want all conditions met, make sure they're all within the AND(..everything here...)
  2. Your original formula used CONTAINS correctly (but your additions did not) and the same format/syntax applies even if using a field instead of a custom metadata value.

CONTAINS should be CONTAINS(text, compare_text) . If that text is a field, then it's just CONTAINS(fieldName, compare_text).

AND(
$CustomMetadata.Process_Builder_Bypass__mdt.Email_Auto_Update_Provided_To_Customer.Bypassed__c,
CONTAINS($CustomMetadata.Process_Builder_Bypass__mdt.Email_Auto_Update_Provided_To_Customer.Profiles__c, $Profile.Name),
CONTAINS([EmailMessage].Parent.Status, "TR/CR"),
CONTAINS([EmailMessage].Subject, "_TR_CR_")
)

There's some good resources:

enter image description here

There's two things within your example that is off:

  1. Parenthesis - if you want all conditions met, make sure they're all within the AND function
AND (
    ..everything here...
)
  1. Your original formula used CONTAINS correctly (but your additions did not) and the same format/syntax applies even if using a field instead of a custom metadata value.

CONTAINS should be in the format of CONTAINS(text, compare_text) . If that text is a field, then it's just CONTAINS(fieldName, compare_text).

AND(
$CustomMetadata.Process_Builder_Bypass__mdt.Email_Auto_Update_Provided_To_Customer.Bypassed__c,
CONTAINS($CustomMetadata.Process_Builder_Bypass__mdt.Email_Auto_Update_Provided_To_Customer.Profiles__c, $Profile.Name),
CONTAINS([EmailMessage].Parent.Status, "TR/CR"),
CONTAINS([EmailMessage].Subject, "_TR_CR_")
)
Source Link
Kris Goncalves
  • 22.8k
  • 8
  • 35
  • 72

There's two good resources:

enter image description here

By searching through the functions and clicking insert, you'll see the format for functions.

There's two things within your example that is off:

  1. Parenthesis - if you want all conditions met, make sure they're all within the AND(..everything here...)
  2. Your original formula used CONTAINS correctly (but your additions did not) and the same format/syntax applies even if using a field instead of a custom metadata value.

CONTAINS should be CONTAINS(text, compare_text) . If that text is a field, then it's just CONTAINS(fieldName, compare_text).

AND(
$CustomMetadata.Process_Builder_Bypass__mdt.Email_Auto_Update_Provided_To_Customer.Bypassed__c,
CONTAINS($CustomMetadata.Process_Builder_Bypass__mdt.Email_Auto_Update_Provided_To_Customer.Profiles__c, $Profile.Name),
CONTAINS([EmailMessage].Parent.Status, "TR/CR"),
CONTAINS([EmailMessage].Subject, "_TR_CR_")
)