Any thoughts on this?
# suitescript
n
Any thoughts on this?
m
We're actually just going through implementation with Avalara. The script that is calculating the shipping cost, is that running in a UE script in the afterSubmit function by chance?
n
It is running in afterSubmit but I have tried to move it to beforeSubmit as well. It threw a different error related to tax - which I believe to be from Avalara script. Why do you ask? The thing is Avalara calculate tax by the button "Calculate Tax". That's why any changes made after that (like marking shipping line as non-taxable) doesn't work in that save.
m
Avalara does have a UE script also to calculate tax, but won’t be triggered by another UE script, especially anything done in the afterSubmit function. It’s an issue we had where we were adding automated fees to an order. You have to make sure all changes needed for taxing are done in the beforeSubmit function and that the Avatax UE runs after any other UE script. That’s what we had to do. Add any special automated fees in a beforeSubmit function. Then make sure that UE was higher on the list than the Avatax UE in the scripted records area for Sales Orders.
n
The script is already higher than Avalara script.
But I don't see there script doing anything in afterSubmit except the logging.