Version: eXtendOrders 1.0. and above
Audience: Administrator, User

If you receive the error below when trying to Edit a Sales Order, the issue may be caused by having the eXtend Deco Order checkbox set to True but other eXtendOrder custom transction body fields hidden or removed and not present on the Sales Order form (Item / Deco subtab, eXtendOrder custom transaction body fields).

TypeError Cannot read property 'elements' of undefined

When the eXtend Deco Order checkbox is set to True, the eXtendOrder scripts are activated. If the fields are not on the Sales Order form you may receive the error above.

The solution is to either add the eXtendOrder fields to your current Sales Order form, or to mark the eXtend Deco Order to False (or default it to false on the form if eXtendOrders should not be active for the current form).