Discussions
Cannot set order status correctly
We have a script that is executed before submit for a sales order that is used to determine whether the order status should be set to pending approval or pending fulfillment based on the items purchased.
The script works correctly for all orders placed through the UI; however, for orders placed through the web store, we are experiencing the following behavior:
1) If the default order status in Setup Accounting is set to Pending Approval, the script cannot set the order status to Pending Fulfillment (we get a permission error) for web orders.
2) If the default order status in Setup Accounting is set to Pending Fulfillment, the script cannot set the order status to Pending Approval (we set it, but it does not stick) for web orders.