KVSFCYCreateProdOrderfromJPL#
Procedures#
CreateProdOrder(Record Job Planning Line, Enum Production Order Status, Option, Code[20], Code[10]) :#
procedure CreateProdOrder(jobPlanLinePar: Record "Job Planning Line"; prodOrderStatusPar: Enum "Production Order Status"; orderTypePar: Option; jobNoPar: Code[20]; prodOrderTypeCodePar: Code[10]):
SetHideValidationDialog(Boolean) :#
Summary: Sets whether validation dialogs should be hidden during production order creation processes. This procedure controls the display of confirmation messages and validation dialogs that normally appear after successful production order creation. When set to true, the system will suppress the "Production Order has been created" message and other user interaction dialogs, which is useful for batch processing or automated scenarios where user prompts are not desired.
procedure SetHideValidationDialog(NewHideValidationDialog: Boolean):
Parameters:
NewHideValidationDialog: True to hide validation dialogs and messages, false to show them normally.
GetProdOrder(Record Production Order) :#
Summary: Retrieves the production order that was created by the most recent CreateProdOrder call. This procedure provides access to the production order record that was stored in the global variable during the production order creation process. It allows other procedures or calling code to access the production order details after creation, including the production order number, status, and other properties that were set during the creation workflow.
procedure GetProdOrder(var prodOrderVar: Record "Production Order"):
Parameters:
prodOrderVar: A variable parameter that will be populated with the production order record created by the last CreateProdOrder call.
SetCalculationOrder() :#
Summary: Sets the production order creation mode to calculation order for quantity handling. This procedure enables calculation order mode, which changes how quantities are handled during production order creation. In calculation mode, the production order quantity is set to the full base quantity from the job planning line rather than subtracting reserved quantities. This is typically used for estimation, planning, or calculation scenarios where the full planned quantity is needed regardless of existing reservations.
procedure SetCalculationOrder():
Events#
OnAfterCreateProdOrder(Record Job Planning Line, Record Production Order) :#
Summary: This Event is triggered after the CreateProdOrderFuntion before the Dialog
[IntegrationEvent(false, false)]
local procedure OnAfterCreateProdOrder(var JobPlanningLine: Record "Job Planning Line"; var ProductionOrder: Record "Production Order"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCreateProdOrderfromJPL", 'OnAfterCreateProdOrder', '', false, false)]
local procedure DoSomethingOnAfterCreateProdOrder(var JobPlanningLine: Record "Job Planning Line"; var ProductionOrder: Record "Production Order")
begin
end;
Parameters:
JobPlanningLine: The Job Planning LineProductionOrder: The Production Order
OnBeforeModifyProdOrderLine(Record Job Planning Line, Record Prod. Order Line) :#
Summary: This Event is triggered before modifying the Prod. Order Line
[IntegrationEvent(false, false)]
local procedure OnBeforeModifyProdOrderLine(var JobPlanningLine: Record "Job Planning Line"; var ProdOrderLine: Record "Prod. Order Line"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCreateProdOrderfromJPL", 'OnBeforeModifyProdOrderLine', '', false, false)]
local procedure DoSomethingOnBeforeModifyProdOrderLine(var JobPlanningLine: Record "Job Planning Line"; var ProdOrderLine: Record "Prod. Order Line")
begin
end;
Parameters:
JobPlanningLine: The Job Planning LineProdOrderLine: The Prod. Order Line
OnAfterModifyProdOrderLine(Record Job Planning Line, Record Prod. Order Line) :#
Summary: This Event is triggered after modifying the Prod. Order Line
[IntegrationEvent(false, false)]
local procedure OnAfterModifyProdOrderLine(var JobPlanningLine: Record "Job Planning Line"; var ProdOrderLine: Record "Prod. Order Line"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYCreateProdOrderfromJPL", 'OnAfterModifyProdOrderLine', '', false, false)]
local procedure DoSomethingOnAfterModifyProdOrderLine(var JobPlanningLine: Record "Job Planning Line"; var ProdOrderLine: Record "Prod. Order Line")
begin
end;
Parameters:
JobPlanningLine: The Job Planning LineProdOrderLine: The Prod. Order Line