5

I hate having to ask but it's my first week on the job and I already feel like I'm failing...I need to create a validation rule with the following criteria and keep coming up with syntax errors. Basically if the case matches the the criteria and the fields in quotes are blank and user attempts to close case I need it to give the user an error:

Picklist when creating - Record Type ID = 012C00000004YW5 Picklist - Team__c = Vendor Services Picklist - Status = Closed or Auto Follow-up

field blank "Resolution_Type__c", "Resolution__c", "Case_Category__c", and "Type"

2
  • We've all felt like that at some point, and asking questions is what this community is built on. Welcome to SFSE. For the fields that you're checking for blank values, what types are those fields? May 21 '15 at 17:04
  • I'm sorry that would be helpful information, wouldn't it? The fields that we are checking for blanks are all pick-lists.
    – Marina P.
    May 21 '15 at 17:12
3

Please try this:

AND(
  (RecordTypeID = '012C00000004YW5'),
  ISPICKVAL(Team__c, 'Vendor Services'),
  OR(
    ISPICKVAL(Status, 'Closed'),
    ISPICKVAL(Status, 'Auto Follow-up')
  ),
  ISPICKVAL(Resolution_Type__c,''),
  ISPICKVAL(Resolution__c,''),
  ISPICKVAL(Case_Category__c,''),
  ISPICKVAL(Type,'')
)
3
  • I'm pretty sure you're my hero...thank you! It works!
    – Marina P.
    May 21 '15 at 17:21
  • @brian just a quick follow up, I'm happy to post this as a separate question if you'd prefer - Do you use a special editor in order to format your formula's like that (not for Stack Exchange but for writing them in Salesforce)? It makes them so much easier to run but also requires a lot of maintenance if you write them in the standard formula editor..
    – Alex S
    May 22 '15 at 8:05
  • @AlexS nope, just in a plain text editor, I just indented the content of each operator to make it more visually clear May 22 '15 at 12:48
1

To check for empty picklists, use:

ISPICKVAL(Field__c, '')

To check with most other fields, use:

ISBLANK(Field__c)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.