LRG
04/28/2023, 12:34 PMnlapiDateToString(nlapiAddDays(nlapiStringToDate({custbody5}),-3))
I wanted to do the same, but set it to -5 when the day is monday, tuesday or wednesday, to cover the weekends, without success.
I thought about using a case when, with the value of :
nlapiStringToDate({custbody5}).getDay()That returns an integer (0 to 6) When I try to use a CASE WHEN, I get the following response from the browser’s console:
caught SyntaxError: missing ) after argument list (at salesord.nl?id=247153&whence=&e=T:13954:50)When using case when, I get the following:
caught SyntaxError: Unexpected token 'case' (at salesord.nl?id=247153&whence=&e=T:13954:50)So my question is, is there a way to have a conditional value, depending on the day of the week in Suiteflow ?
LRG
04/28/2023, 12:52 PMnlapiStringToDate(nlapiGetFieldValue('custbody5')).getDay() == 1 || nlapiStringToDate(nlapiGetFieldValue('custbody5')).getDay() == 2 || nlapiStringToDate(nlapiGetFieldValue('custbody5')).getDay() == 3I apply the date -5 days
And nlapiStringToDate(nlapiGetFieldValue('custbody5')).getDay() != 1 || nlapiStringToDate(nlapiGetFieldValue('custbody5')).getDay() != 2 || nlapiStringToDate(nlapiGetFieldValue('custbody5')).getDay() != 3I apply the date -3 days
Netsuite Tragic
06/28/2023, 11:21 AM