0

I am working on developing a validation rule, where a particular date time field should not be greater than 24 Hours from the Created Date time.

1 Answer 1

-1

You can do it this way

IF(ISNEW() , NOT(ISBLANK( Field__c ) ) && ROUND((Field__c - Now())*24 ,0) >24, NOT(ISBLANK( Field__c ) ) && ROUND((Field__c - CreatedDate)*24 ,0) > 24 )
12
  • Hi, thanks for response. Howeverver the provided formula didn't work as expected. Record once saved could not be modified. Mar 12, 2020 at 11:42
  • Could you please explain further what you mean by "Record once saved could not be modified." do you mean existing data?
    – Abhijith E
    Mar 12, 2020 at 11:48
  • ROUND( Field__c - CreatedDate ,0) > 0 in the mentioned rule, the field 'CreatedDate' is generated once the record is created but when the same record is editted, it shows error against saving the same as it validates the mentioned rule. Solution? Mar 12, 2020 at 11:56
  • Updated description and answer please try this 😀
    – Abhijith E
    Mar 12, 2020 at 12:03
  • It is not working as expected. Instead of 24 Hours it is validating for 12 hours post the creation date/time. Mar 12, 2020 at 13:34

You must log in to answer this question.

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