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
Sel DiestaSel Diesta 

formula field to enable boolean field based on picklist

I am trying to update the field based on the following conditions:

if the Date Create is less that 30 seconds and the Lead Status = Working Contacted.
I have my formula below that does not work:

IF( OR(ISPICKVAL(Status,"Working - Contacted"))
    DATEVALUE(LastModifiedDate  - CreatedDate) * 86400<= 30)),TRUE,FALSE)

Please help.
Best Answer chosen by Sel Diesta
pkpnairpkpnair
IF( ISPICKVAL(Status,"Working - Contacted") && (NOW()-CreatedDate)*24*60*60 <=30, True, False)

All Answers

pkpnairpkpnair
IF( ISPICKVAL(Status,"Working - Contacted") && (NOW()-CreatedDate)*24*60*60 <=30, True, False)
This was selected as the best answer
Sel DiestaSel Diesta
Thanks How2Salesforce! I'm glad I was close to my logic.
pkpnairpkpnair
If it helped, please mark it as the best answer
Sel DiestaSel Diesta
This really helped! Thank you so much!