is it possible to use SuiteScript to set shipping ...
# suitescript
m
is it possible to use SuiteScript to set shipping / handling costs for an order? I've been trying to set it using a UE script on beforeSubmit, but seeing no updates on save. Would use native Shipping Items, but the business requirement is to calculate handling cost dynamically based on the item's category for each line item
b
yes
same rules as the ui, you need to have a shipping item set
and have one that allows charging a handling cost
m
@battk okay so if I made a dummy shipping item to use as a placeholder then set its handling cost, it should work?
b
if the dummy item is setup to allow handling costs, yes
m
@battk Thanks a bunch 🙂
d
@battk similar question here. I am trying to "reset" the shipping cost before submit by setting the quantity of the first item but after doing so, the getValue("shippingcost") is still the same as it was before the update. The reason I need to reset it I am adding additional fees and unless I reset it, the fees keep stacking on top of shipping cost + fees etc. Hope this makes sense. Is there a way to get a newly calculated shipping cost value on beforeSubmit with the same behavior in the UI where if quantity changes, the cost changes?