Question concerning field updates using Date values

  • 1
  • Question
  • Updated 3 years ago
I am trying to do a field update in the action frame work with a Date field.  I would like to set a date field to be 2 months in the future.  I created an action - Update a field on row, select the date field to update, for Value select 'Next n Days' and enter 56 for the day value.  When the frame work runs it does not appear the date field gets set.   It does appear to work if I set the date field to a specific date.  Any suggestions?  
Photo of Jeffrey Lawler

Jeffrey Lawler

  • 1,454 Points 1k badge 2x thumb

Posted 4 years ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
I'm not sure, but I think 'next n days' is technically a range between now and the next 56 days. I don't think that you can use that to set a specific date 56 days from now.

You'll probably have to use some javascript:

d = new Date();
d.setDate(d.getDate + 56);
skuid.time.getSFDate(d);


... or something like that.
Photo of Griffin Brown

Griffin Brown

  • 2,766 Points 2k badge 2x thumb
Did you ever solve this all the way? If so, could I see a code sample?