1

I'm trying to add a validation rule for a custom field(Service_Date__c) in Case object. If a Service_Date__c > today(), then error message should be displayed as :

Service Date should be greater than today

But the rule should fire only for new records. I tried like this :

ISNEW(Service_Date__c > today())

Error: Incorrect number of parameters for function 'isnew()'. Expected 0, received 1.

What am i missing? How to do this?

1 Answer 1

3

Try this,

ISNEW() && Service_Date__c <= today()

IsNew doesn't neeed any parameter. It returns true for insert and false for rest.

7
  • the following code ISNEW() && Service_Date__c >today(), not throwing any error. But when i create a new Case record, the validation rule not getting fired.
    – user42000
    Apr 6, 2017 at 12:46
  • 1
    @user42000 - I modified the answer to reflect that the Service_Date__c should be greater than today. So it will fire if new and service date is < or = today
    – Eric
    Apr 6, 2017 at 12:49
  • You need less than today or greater than today. Apr 6, 2017 at 12:49
  • Service Date should not be less than today
    – user42000
    Apr 6, 2017 at 12:50
  • @Eric have changed it now. Use the modified rule. It will work. Apr 6, 2017 at 12:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .