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:
MGCLatticeProductionOrderPostingServiceA 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:
strAn empty string when the update was allowed; otherwise the failure message.
| Name | Type | Optional | Description |
|---|---|---|---|
_updateAllowed | boolean | No | The value the ProdStatusType.run* method returned. |
_prodId | ProdId | No | The production order. |
_currentStatus | ProdStatus | No | The order's status before the update. |
_operationName | str | No | The 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:
MGCLatticeOrderOperationResponseContractAn MGCLatticeOrderOperationResponseContract indicating success or failure with details.
| Name | Type | Optional | Description |
|---|---|---|---|
_request | MGCLatticeProductionStartRequestContract | No | The 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:
MGCLatticeOrderOperationResponseContractAn MGCLatticeOrderOperationResponseContract indicating success or failure with details.
| Name | Type | Optional | Description |
|---|---|---|---|
_request | MGCLatticeProductionReportFinishedRequestContract | No | The 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:
MGCLatticeOrderOperationResponseContractAn MGCLatticeOrderOperationResponseContract indicating success or failure with details.
| Name | Type | Optional | Description |
|---|---|---|---|
_request | MGCLatticeProductionEndRequestContract | No | The request containing ProdId, PostingDate, and standard header fields. |
estimateProductionOrder
Runs cost estimation for a production order.
- Visibility:
public - Returns:
MGCLatticeOrderOperationResponseContractAn MGCLatticeOrderOperationResponseContract indicating success or failure with details.
| Name | Type | Optional | Description |
|---|---|---|---|
_request | MGCLatticeProductionOrderActionRequestContract | No | The request containing ProdId and standard header fields. |
scheduleProductionOrder
Runs job scheduling for a production order.
- Visibility:
public - Returns:
MGCLatticeOrderOperationResponseContractAn MGCLatticeOrderOperationResponseContract indicating success or failure with details.
| Name | Type | Optional | Description |
|---|---|---|---|
_request | MGCLatticeProductionOrderActionRequestContract | No | The request containing ProdId and standard header fields. |
releaseProductionOrder
Releases a production order to the shop floor.
- Visibility:
public - Returns:
MGCLatticeOrderOperationResponseContractAn MGCLatticeOrderOperationResponseContract indicating success or failure with details.
| Name | Type | Optional | Description |
|---|---|---|---|
_request | MGCLatticeProductionOrderActionRequestContract | No | The 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:
ProdBOMThe 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).
| Name | Type | Optional | Description |
|---|---|---|---|
_prodTable | ProdTable | No | The production order. |
_line | MGCLatticeProductionPickListLineContract | No | The request line; may be null. |
_position | int | No | The 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:
ProdRouteThe primary ProdRoute record of the operation.
| Name | Type | Optional | Description |
|---|---|---|---|
_prodTable | ProdTable | No | The production order. |
_line | MGCLatticeProductionRouteCardLineContract | No | The request line; may be null. |
_position | int | No | The 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:
MGCLatticeOrderOperationResponseContractAn MGCLatticeOrderOperationResponseContract indicating success or failure with details.
| Name | Type | Optional | Description |
|---|---|---|---|
_request | MGCLatticeProductionPickListPostRequestContract | No | The 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:
MGCLatticeOrderOperationResponseContractAn MGCLatticeOrderOperationResponseContract indicating success or failure with details.
| Name | Type | Optional | Description |
|---|---|---|---|
_request | MGCLatticeProductionRouteCardPostRequestContract | No | The 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:
MGCLatticeStatusQueryResponseContractAn MGCLatticeStatusQueryResponseContract with the production order status and detail information.
| Name | Type | Optional | Description |
|---|---|---|---|
_request | MGCLatticeStatusQueryRequestContract | No | The request containing DocumentId (ProdId) and standard header fields. |
startProductionOrderBatch
Starts multiple production orders in a single bulk operation.
- Visibility:
public - Returns:
MGCLatticeBulkOperationResponseContractAn MGCLatticeBulkOperationResponseContract containing per-item results.
| Name | Type | Optional | Description |
|---|---|---|---|
_requests | List | No | List of MGCLatticeProductionStartRequestContract. |
reportAsFinishedBatch
Reports multiple production orders as finished in a single bulk operation.
- Visibility:
public - Returns:
MGCLatticeBulkOperationResponseContractAn MGCLatticeBulkOperationResponseContract containing per-item results.
| Name | Type | Optional | Description |
|---|---|---|---|
_requests | List | No | List of MGCLatticeProductionReportFinishedRequestContract. |
endProductionOrderBatch
Ends multiple production orders in a single bulk operation.
- Visibility:
public - Returns:
MGCLatticeBulkOperationResponseContractAn MGCLatticeBulkOperationResponseContract containing per-item results.
| Name | Type | Optional | Description |
|---|---|---|---|
_requests | List | No | List of MGCLatticeProductionEndRequestContract. |
estimateProductionOrderBatch
Estimates multiple production orders in a single bulk operation.
- Visibility:
public - Returns:
MGCLatticeBulkOperationResponseContractAn MGCLatticeBulkOperationResponseContract containing per-item results.
| Name | Type | Optional | Description |
|---|---|---|---|
_requests | List | No | List of MGCLatticeProductionOrderActionRequestContract. |
scheduleProductionOrderBatch
Schedules multiple production orders in a single bulk operation.
- Visibility:
public - Returns:
MGCLatticeBulkOperationResponseContractAn MGCLatticeBulkOperationResponseContract containing per-item results.
| Name | Type | Optional | Description |
|---|---|---|---|
_requests | List | No | List of MGCLatticeProductionOrderActionRequestContract. |
releaseProductionOrderBatch
Releases multiple production orders in a single bulk operation.
- Visibility:
public - Returns:
MGCLatticeBulkOperationResponseContractAn MGCLatticeBulkOperationResponseContract containing per-item results.
| Name | Type | Optional | Description |
|---|---|---|---|
_requests | List | No | List of MGCLatticeProductionOrderActionRequestContract. |
postPickListBatch
Posts pick lists for multiple production orders in a single bulk operation.
- Visibility:
public - Returns:
MGCLatticeBulkOperationResponseContractAn MGCLatticeBulkOperationResponseContract containing per-item results.
| Name | Type | Optional | Description |
|---|---|---|---|
_requests | List | No | List of MGCLatticeProductionPickListPostRequestContract. |
postRouteCardBatch
Posts route cards for multiple production orders in a single bulk operation.
- Visibility:
public - Returns:
MGCLatticeBulkOperationResponseContractAn MGCLatticeBulkOperationResponseContract containing per-item results.
| Name | Type | Optional | Description |
|---|---|---|---|
_requests | List | No | List of MGCLatticeProductionRouteCardPostRequestContract. |