```salesorder = record.load({..., isDynamic:false}...
# suitescript
a
Copy code
salesorder = record.load({..., isDynamic:false})
salesorder.setValue({fieldId:'trandate', value: new Date(), ignoreFieldChange:true})
salesorder.save()
appears to also be setting the transaction's
shipdate
. This is in a user event script's aftersubmit function, there are no other script deployments in aftersubmit, all workflows affecting sales orders have logging turned on, none of them seem to be responsible,
shipdate
is not set anywhere in the code. I've tried commenting out just the setValue line to check if something else is responsible. Have I forgotten to check something else or is this a bug?
s
What are you expecting to set the shipdate or you expecting it to be blank?
a
I conditionally set the shipdate elsewhere in the code, if the user hasn't put something in yet. In the test I'm using, the field has been filled in by an afterfieldsourcing workflow, so I expect to leave it alone.
s
Have you tried setting
ignoreFieldChange:true
in your set value call if you dont want the trandate setting to do anything?
a
I had not. I've just tried it, no joy.
Rearranging it to set trandate before (unconditionally) setting the shipdate worked, even though standard mode is supposed to make that not matter... Thanks for pointing me in the right direction!