What is the correct way to add x number of days to...
# general
l
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
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
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
explain what the workflow should do please
l
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
not sure that it works with workflow client triggers. Why not use a client script directly?
m
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
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.