Off the back of a topic I raised about creating a customisation that would populate a field on Job Entry, using criteria from a field in PartPlant, this is now working great for us.
Using a data directive on JobHead, bringing in an Update Table by query, joining in Part Plant and setting the calculation on the JobHead.BufferDate_c we created.
However… we now need to make this look at working days (Mon-Fri) rather than calendar days. As far as I can tell, there’s no way to add a function to the same expression as it errors saying ‘Expression should contain only one statement’.
Does anyone know any ways we could create a WorkDays function that sits in front of this Update Table by query block or do we maybe need to rethink this whole method?
I’m just thinking if we need to switch this to a pre-processing method to give us more functionality, maybe using the ‘Invoke Function’ to work out weekdays before we set the ‘Update Table by Query’ do you know how we might be able to use this please?
I’ve checked in Dev tools/debugger and it doesn’t need to be a data directive, we are only to looking to update JobHead.BufferDate_c based on if the JobHead.PlannedKitDate has been changed.