0

Requirement: When New Lead is created with Course Type as online, phone no cannot be blank

The below validation rule which i tried.

AND(
ISNEW(ISPICKVAL(CourseType__c,'online'))),
ISNULL(Phone)
2
AND( ISNEW(),ISPICKVAL(CourseType__c,'online'),ISBLANK(Phone))
2

The ISNEW function does not take any parameters.

AND(
    ISNEW(),
    ISPICKVAL(CourseType__c, 'online'),
    ISNULL(Phone)
)
0

I think this one also works well.

Please use this formula:

IF(ISNEW() && Phone==null && ISPICKVAL(CourseType__c ,'online'),true, false)

As Adrian is saying we also need to add the ISNEW() in the formula to target new records only..so, I added the ISNEW() in the formula and it works fine.

  • You're not checking if it's a new record. You can also always replace IF(condition, true, false) with simply condition. – Adrian Larson Feb 26 '17 at 18:53
  • You right Adrian, the ISNEW() needs to be part of the formula as well.. I updated my answer. – Carlos Naranjo Feb 26 '17 at 19:03
  • It's still redundant. – Adrian Larson Feb 27 '17 at 1:55

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.