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
David Moore 17David Moore 17 

Create Datefiled which populates based on picklist

Hi All, 

I have new date/time field (datefield1)
I have picklist field (values = support and service)
I have existing date field called stampfield

Scenario is:
when picklist value 'support' is selected: my new date filed should calulate stampied time + 1 hour

when picklust calue 'service' is selected: my new date field should calculate stamped time filed +24 hours

How do I acheive this? Please suggest
PriyaPriya (Salesforce Developers) 
Hi David,
 

The developer community recommends providing any attempts/code you've started, any errors you're getting, or where exactly you're struggling in achieving this while posting a question.




Thanks
David Moore 17David Moore 17
? I do not understand your question
PriyaPriya (Salesforce Developers) 

Hi David,

I mean to say that, have you tried doing the above requirement ? Have you written any formula or code? what is the error have you faced in your formula or code? 

So that we can work on the error you have faced to fix it. Complete implementation will be difficult to provide here.

Hope you get it.

Thanks

SteveMo__cSteveMo__c
So basically this? 
DateTimeField + 

CASE( PicklistField,
'Support', ( 1 / 24 ),
'Service', 1,
0 )

( 1 / 24 ) = 1 hour
1 = 1 Day / 24 Hours