Skip to main content

MGCLatticeProductionOrderPostingService

Custom service for production order lifecycle operations including estimation, scheduling, release, start, report as finished, end, pick list, and route card posting. No operation has a preview: a request with PreviewMode set is refused as PreviewUnsupported before anything runs. Pick list, route card and report as finished return the number of the production journal they posted in PostedDocumentId; the other operations produce no document of their own and leave it empty. Route card and pick list lines are posted exactly as sent: the header-driven automatic report as finished (last operation) and automatic picking list of the route card form are not applied.

Methods​

new​

Initializes a new instance of the MGCLatticeProductionOrderPostingService class.

  • Visibility: public
  • Returns: void

No parameters.

construct​

Creates a new instance of the MGCLatticeProductionOrderPostingService class.

  • Visibility: public
  • Returns: MGCLatticeProductionOrderPostingService A new MGCLatticeProductionOrderPostingService instance.

No parameters.

prodStatusUpdateRefusal​

Decides whether a ProdStatusType.run* result means the status update did not happen, and builds the failure message. Those methods do not throw when the production control parameters do not allow the update from the order's current status: they skip it and return false.

  • Visibility: public
  • Returns: str An empty string when the update was allowed; otherwise the failure message.
NameTypeOptionalDescription
_updateAllowedbooleanNoThe value the ProdStatusType.run* method returned.
_prodIdProdIdNoThe production order.
_currentStatusProdStatusNoThe order's status before the update.
_operationNamestrNoThe operation that requested the update.

startProductionOrder​

Starts a production order by creating startup parameters and executing the production status transition. The start applies the site's start parameters (automatic BOM and route consumption) as Microsoft's own programmatic start does; an omitted StartQty starts the quantity not yet started.

  • Visibility: public
  • Returns: MGCLatticeOrderOperationResponseContract An MGCLatticeOrderOperationResponseContract indicating success or failure with details.
NameTypeOptionalDescription
_requestMGCLatticeProductionStartRequestContractNoThe request containing ProdId, PostingDate, StartQty, and standard header fields.

reportAsFinished​

Reports a production order as finished, recording good and error quantities. Without EndJob the report is partial (the order keeps its status and remaining quantity); with it the job ends and the order becomes Reported as finished. The posted report-as-finished journal is returned in PostedDocumentId.

  • Visibility: public
  • Returns: MGCLatticeOrderOperationResponseContract An MGCLatticeOrderOperationResponseContract indicating success or failure with details.
NameTypeOptionalDescription
_requestMGCLatticeProductionReportFinishedRequestContractNoThe request containing ProdId, PostingDate, GoodQty, ErrorQty, EndJob, AcceptError, and standard header fields.

endProductionOrder​

Ends a production order by running historical cost calculation, requiring Reported as finished status. PostingDate is the calculation date of the end (empty = today).

  • Visibility: public
  • Returns: MGCLatticeOrderOperationResponseContract An MGCLatticeOrderOperationResponseContract indicating success or failure with details.
NameTypeOptionalDescription
_requestMGCLatticeProductionEndRequestContractNoThe request containing ProdId, PostingDate, and standard header fields.

estimateProductionOrder​

Runs cost estimation for a production order.

  • Visibility: public
  • Returns: MGCLatticeOrderOperationResponseContract An MGCLatticeOrderOperationResponseContract indicating success or failure with details.
NameTypeOptionalDescription
_requestMGCLatticeProductionOrderActionRequestContractNoThe request containing ProdId and standard header fields.

scheduleProductionOrder​

Runs job scheduling for a production order.

  • Visibility: public
  • Returns: MGCLatticeOrderOperationResponseContract An MGCLatticeOrderOperationResponseContract indicating success or failure with details.
NameTypeOptionalDescription
_requestMGCLatticeProductionOrderActionRequestContractNoThe request containing ProdId and standard header fields.

releaseProductionOrder​

Releases a production order to the shop floor.

  • Visibility: public
  • Returns: MGCLatticeOrderOperationResponseContract An MGCLatticeOrderOperationResponseContract indicating success or failure with details.
NameTypeOptionalDescription
_requestMGCLatticeProductionOrderActionRequestContractNoThe request containing ProdId and standard header fields.

resolvePickListBomLine​

Validates a pick list request line and finds the production BOM line it consumes against: the line its InventTransId (lot id) names, else the order's only open BOM line (remaining physical quantity) for its item. Fails as ValidationFailed for an empty line, a quantity not greater than zero, an unknown inventory dimension, a lot that is not a BOM line of the order or does not match the item, a line without item, and an item with more than one open BOM line; an unknown item fails as DocumentNotFound.

  • Visibility: public
  • Returns: ProdBOM The BOM line to consume against; an empty buffer when the item has no open BOM line (a new BOM line is then added, as the journal form does for a line without lot id).
NameTypeOptionalDescription
_prodTableProdTableNoThe production order.
_lineMGCLatticeProductionPickListLineContractNoThe request line; may be null.
_positionintNoThe request line's one-based position, for messages.

resolveRouteCardOperation​

Validates a route card request line and finds the primary route operation it reports on. Fails as ValidationFailed for an empty line, a line without OprNum, a line that reports neither hours nor quantities, and an operation that is not on the order's route.

  • Visibility: public
  • Returns: ProdRoute The primary ProdRoute record of the operation.
NameTypeOptionalDescription
_prodTableProdTableNoThe production order.
_lineMGCLatticeProductionRouteCardLineContractNoThe request line; may be null.
_positionintNoThe request line's one-based position, for messages.

postPickList​

Posts a production pick list journal with BOM consumption lines for material issuance. Each line consumes against a production BOM line of the order (resolvePickListBomLine): the one its InventTransId names, else the order's only open BOM line for the item; an item without an open BOM line is consumed on a new BOM line (unplanned consumption). The posted journal is returned in PostedDocumentId.

  • Visibility: public
  • Returns: MGCLatticeOrderOperationResponseContract An MGCLatticeOrderOperationResponseContract indicating success or failure with details.
NameTypeOptionalDescription
_requestMGCLatticeProductionPickListPostRequestContractNoThe request containing ProdId, PostingDate, pick list lines with ItemId/Qty, and standard header fields.

postRouteCard​

Posts a production route card journal with operation hours and quantity reporting. Each line reports process time and quantities on a primary operation of the order's route and is defaulted as the route card form does (job type Process, resource, cost categories and prices, executed percentage). The posted journal is returned in PostedDocumentId.

  • Visibility: public
  • Returns: MGCLatticeOrderOperationResponseContract An MGCLatticeOrderOperationResponseContract indicating success or failure with details.
NameTypeOptionalDescription
_requestMGCLatticeProductionRouteCardPostRequestContractNoThe request containing ProdId, PostingDate, route card lines with OprNum/Hours, and standard header fields.

getProductionOrderStatus​

Queries the current status of a production order including quantities and lifecycle state.

  • Visibility: public
  • Returns: MGCLatticeStatusQueryResponseContract An MGCLatticeStatusQueryResponseContract with the production order status and detail information.
NameTypeOptionalDescription
_requestMGCLatticeStatusQueryRequestContractNoThe request containing DocumentId (ProdId) and standard header fields.

startProductionOrderBatch​

Starts multiple production orders in a single bulk operation.

  • Visibility: public
  • Returns: MGCLatticeBulkOperationResponseContract An MGCLatticeBulkOperationResponseContract containing per-item results.
NameTypeOptionalDescription
_requestsListNoList of MGCLatticeProductionStartRequestContract.

reportAsFinishedBatch​

Reports multiple production orders as finished in a single bulk operation.

  • Visibility: public
  • Returns: MGCLatticeBulkOperationResponseContract An MGCLatticeBulkOperationResponseContract containing per-item results.
NameTypeOptionalDescription
_requestsListNoList of MGCLatticeProductionReportFinishedRequestContract.

endProductionOrderBatch​

Ends multiple production orders in a single bulk operation.

  • Visibility: public
  • Returns: MGCLatticeBulkOperationResponseContract An MGCLatticeBulkOperationResponseContract containing per-item results.
NameTypeOptionalDescription
_requestsListNoList of MGCLatticeProductionEndRequestContract.

estimateProductionOrderBatch​

Estimates multiple production orders in a single bulk operation.

  • Visibility: public
  • Returns: MGCLatticeBulkOperationResponseContract An MGCLatticeBulkOperationResponseContract containing per-item results.
NameTypeOptionalDescription
_requestsListNoList of MGCLatticeProductionOrderActionRequestContract.

scheduleProductionOrderBatch​

Schedules multiple production orders in a single bulk operation.

  • Visibility: public
  • Returns: MGCLatticeBulkOperationResponseContract An MGCLatticeBulkOperationResponseContract containing per-item results.
NameTypeOptionalDescription
_requestsListNoList of MGCLatticeProductionOrderActionRequestContract.

releaseProductionOrderBatch​

Releases multiple production orders in a single bulk operation.

  • Visibility: public
  • Returns: MGCLatticeBulkOperationResponseContract An MGCLatticeBulkOperationResponseContract containing per-item results.
NameTypeOptionalDescription
_requestsListNoList of MGCLatticeProductionOrderActionRequestContract.

postPickListBatch​

Posts pick lists for multiple production orders in a single bulk operation.

  • Visibility: public
  • Returns: MGCLatticeBulkOperationResponseContract An MGCLatticeBulkOperationResponseContract containing per-item results.
NameTypeOptionalDescription
_requestsListNoList of MGCLatticeProductionPickListPostRequestContract.

postRouteCardBatch​

Posts route cards for multiple production orders in a single bulk operation.

  • Visibility: public
  • Returns: MGCLatticeBulkOperationResponseContract An MGCLatticeBulkOperationResponseContract containing per-item results.
NameTypeOptionalDescription
_requestsListNoList of MGCLatticeProductionRouteCardPostRequestContract.