What is the correct way to add x number of days to a custom date field with an after field edit trigger in a workflow? This does not work: nlapiAddDays({custbody_delivery_date},5)
a
AnaFarms
10/29/2023, 7:24 AM
nlapiAddDays? Sounds like some suitescript 1.0 function.
If the field is correctly set up and the date value doesn't need modifications, your formula should be simply: {custbody_delivery_date}+5
l
Luis
10/29/2023, 8:29 AM
That works only on server triggers like before record submit and after record submit. My trigger is after field edit. There are suiteanswers with these examples (nlapiAddDays) but none of them seem to work. If I go through the Function dropdown when creating a formula, the options are mostly suitescript functions.
m
Marc
10/29/2023, 12:22 PM
explain what the workflow should do please
l
Luis
10/29/2023, 12:41 PM
The workflow should set the due date by adding 5 days to a custom date field whenever the custom date field is edited or the terms field is edited.
m
Marc
10/29/2023, 12:44 PM
not sure that it works with workflow client triggers. Why not use a client script directly?
m
MGBC
10/29/2023, 2:38 PM
Yes I’ve never been able to perform calculations with client triggers in workflows. I’ve even tried just simple math like quantity + 1 and it never works. Always have to use before submit or after submit.
l
Luis
10/29/2023, 4:29 PM
Thank you! It’s really weird as there are a handful of articles about these but none of them are working for me. Anw, I’ll just use before record submit in the meantime.