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
b.gonzalezb.gonzalez 

A Validation Rule for "Call Results" field (standard text field)

I am trying to create a validation rule for "Call Results' field on the task page layout.

 

How do I write the validation rule to include all listed below? Here is the formula I have so far:

 

OR ( 
(NOT(REGEX("Not Left Voicemail", CallDisposition ))), 
(NOT(REGEX("Left Voicemail", CallDisposition ))) 
)

 

The acceptable entries for the text  field are:

  • Busy
  • Left Voicemail
  • Left Live Message
  • Wrong Number
  • No Answer
  • Contact
  • Correct Contact
  • Set Callback
  • Transfer

Thanks. 

Best Answer chosen by Admin (Salesforce Developers) 
puneet28puneet28

Hi b.gonzalez,

You can create a validation rule like this:

 

NOT(
OR(
CallDisposition = "Busy",
CallDisposition = "Left Voicemail",
CallDisposition = "Left Live Message",
CallDisposition = "Wrong Number",
CallDisposition = "No Answer",
CallDisposition = "Contact",
CallDisposition = "Correct Contact",
CallDisposition = "Set Callback",
CallDisposition = "Transfer"
)
)

 Or this:

 

CASE( CallDisposition,
     "Busy", 1,
     "Left Voicemail", 1,
     "Left Live Message", 1,
     "Wrong Number", 1,
     "No Answer", 1,
     "Contact", 1,
     "Correct Contact", 1,
     "Set Callback", 1,
     "Transfer", 1,
     0) = 0

 

Please be nformed that validation rule criteria are case sensitive. Also this will make the field required. If you don't want it to be required then use this:

AND(
 NOT(ISBLANK(CallDisposition)),
NOT(
OR(
CallDisposition = "Busy",
CallDisposition = "Left Voicemail",
CallDisposition = "Left Live Message",
CallDisposition = "Wrong Number",
CallDisposition = "No Answer",
CallDisposition = "Contact",
CallDisposition = "Correct Contact",
CallDisposition = "Set Callback",
CallDisposition = "Transfer"
)
)
)

 

 

 

 

All Answers

puneet28puneet28

Hi b.gonzalez,

You can create a validation rule like this:

 

NOT(
OR(
CallDisposition = "Busy",
CallDisposition = "Left Voicemail",
CallDisposition = "Left Live Message",
CallDisposition = "Wrong Number",
CallDisposition = "No Answer",
CallDisposition = "Contact",
CallDisposition = "Correct Contact",
CallDisposition = "Set Callback",
CallDisposition = "Transfer"
)
)

 Or this:

 

CASE( CallDisposition,
     "Busy", 1,
     "Left Voicemail", 1,
     "Left Live Message", 1,
     "Wrong Number", 1,
     "No Answer", 1,
     "Contact", 1,
     "Correct Contact", 1,
     "Set Callback", 1,
     "Transfer", 1,
     0) = 0

 

Please be nformed that validation rule criteria are case sensitive. Also this will make the field required. If you don't want it to be required then use this:

AND(
 NOT(ISBLANK(CallDisposition)),
NOT(
OR(
CallDisposition = "Busy",
CallDisposition = "Left Voicemail",
CallDisposition = "Left Live Message",
CallDisposition = "Wrong Number",
CallDisposition = "No Answer",
CallDisposition = "Contact",
CallDisposition = "Correct Contact",
CallDisposition = "Set Callback",
CallDisposition = "Transfer"
)
)
)

 

 

 

 

This was selected as the best answer
b.gonzalezb.gonzalez

Thank you!

puneet28puneet28

Glad that I could help you. Please mark the answer as solution and and give Kudos.