Postman collection
Suppliers Write

pixiSupplierOrderLineCreate

Adds order lines to an existing purchase order (supplier order) in status NEW or BES, based on an XML document of items.

Adds lines to an existing purchase order (supplier order).

  1. The user is resolved from UserName. If the name is unknown, the user pixiAdministration is used.
  2. ConsiderPackageUnits and ConsiderMinOrderQty are set to 0 if NULL.
  3. The purchase order is searched in SupplierOrder by Id = SupplierOrderId or InternalNumber = SupplierOrderNr. Exactly one order must match:
    • no match: error Purchase order does not exist!
    • more than one match: error Parameters @SupplierOrderId and @SupplierOrderNr belong to different purchase order!
  4. The order must have status 1 (NEW) or 2 (BES). Otherwise the call returns Purchase order is not in status NEW or BES!
  5. If all checks pass, the internal procedure pixi.SupplierOrderLineCreate creates the lines. It receives the order ID, the user ID, both flags and PurchaseOrderXML.

The call returns one result set with status rows (Status, StatusDescription, ItemId), sorted by Status and ItemId.

Notes

  • The actual line creation is done by pixi.SupplierOrderLineCreate, which is not attached. Several things therefore cannot be documented here:
    • the expected structure of PurchaseOrderXML
    • how package units and minimum order quantities are applied
    • which tables are written
    • which status and description values appear in the result on success
  • pixi.SupplierOrderLineCreate is called with @pipiSupplierOrderLineCreate_ReturnInfo = 1. Presumably it writes its per-item results into the temporary result table that this call returns.
  • Pass only one of SupplierOrderId or SupplierOrderNr, or make sure both refer to the same order. The lookup uses OR, so two different matches cause an error. If both are NULL, nothing matches and Purchase order does not exist! is returned.
  • The order lookup uses NOLOCK.
  • The call runs in its own transaction, or in a savepoint if a transaction is already open.
  • On a SQL error the transaction is rolled back and the error is logged via log.InsertError. Whether the error is passed on to the caller depends on that procedure, which is not attached. In that case the status result set may be missing.

Tables used

SupplierOrder · Read UCS_USERS · Read
SQL object:
dbo.pipiSupplierOrderLineCreate
Updated at 2026-10-30