Skip to main content

supplyBulkUpdatePoLineDates

Sets the expected ship date on selected purchase order lines.

Business Rules​

  • Omit poItemIds to apply to every active line on the purchase order. An empty array is rejected rather than treated as "all".
  • EXPLICIT applies expectedShipDate to each selected line. A null expectedShipDate clears them. Omitting the argument entirely is rejected.
  • FROM_HEADER copies the purchase order's own expected ship date and requires that date to be set.
  • FROM_LEAD_TIME adds each line's lead time in days to the base named by leadTimeBase. Lines with no lead time are skipped rather than rejected and are returned in skippedLineIds. When every selected line is skipped the mutation succeeds and writes nothing.

Error Scenarios​

  • Purchase order not found - no purchase order with that id in the current company.
  • Select at least one line to update. - poItemIds was supplied as an empty array.
  • Lines not on this purchase order: <ids> - one or more supplied ids belong to a different purchase order.
  • The purchase order has no lines to update - the purchase order has no active lines.
  • EXPLICIT requires an expectedShipDate. Pass null to clear the selected lines. - the argument was omitted.
  • Set an expected ship date on the purchase order before copying it to lines. - FROM_HEADER with no header date.
  • The purchase order has no issue date. / The purchase order has no confirmed date. - the chosen lead time base is empty.
  • A base date is required when using a custom base. - leadTimeBase was CUSTOM without leadTimeBaseDate.
  • A lead time base is required for this strategy. - FROM_LEAD_TIME without leadTimeBase.

Permissions Required​

  • supply:update_po
  • A company context (X-Company-Id) is required, and the purchase order must belong to that company.
supplyBulkUpdatePoLineDates(
input: BulkUpdatePOLineDatesInput!
): POLineDatesPayload!

Arguments​

supplyBulkUpdatePoLineDates.input ● BulkUpdatePOLineDatesInput! non-null input common​

Parameters for BulkUpdatePOLineDates

Type​

POLineDatesPayload object purchase-orders​

Result of a bulk line date update.