Discussions
How to set up a Workflow that sets a Date field to weekday prior the value of another Date field?
I've created a workflow to set a production date field to be 1 day before a ship date field. This works except I only want to use weekdays. If something is scheduled to be shipped on Monday, it needs to be produced on the Friday before. To test, this is the formula I used: nlapiDateToString(nlapiAddDays(new Date(nlapiGetFieldValue('startdate')),-1)). This will subtract 1 from the start date field, but doesn't take weekdays or weekends into account. How could I accomplish this?