Codeunit "Production Journal Mgt"

ID 5510
Namespace: Microsoft.Manufacturing.Journal

Methods

Handling

procedure Handling(ProdOrder: Record "Production Order", ActualLineNo: Integer)

Parameters

Name Type Description
ProdOrder Table Microsoft.Manufacturing.Document."Production Order"
ActualLineNo Integer

CreateJnlLines

procedure CreateJnlLines(ProdOrder: Record "Production Order", ProdOrderLineNo: Integer)

Parameters

Name Type Description
ProdOrder Table Microsoft.Manufacturing.Document."Production Order"
ProdOrderLineNo Integer

InsertComponents

procedure InsertComponents(ProdOrderLine: Record "Prod. Order Line", CheckRoutingLink: Boolean, Level: Integer)

Parameters

Name Type Description
ProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"
CheckRoutingLink Boolean
Level Integer

RoutingLinkValid

procedure RoutingLinkValid(ProdOrderComp: Record "Prod. Order Component", ProdOrderLine: Record "Prod. Order Line"): Boolean

Parameters

Name Type Description
ProdOrderComp Table Microsoft.Manufacturing.Document."Prod. Order Component"
ProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"

Returns

Type Description
Boolean

InsertConsumptionItemJnlLine

procedure InsertConsumptionItemJnlLine(ProdOrderComp: Record "Prod. Order Component", ProdOrderLine: Record "Prod. Order Line", Level: Integer)

Parameters

Name Type Description
ProdOrderComp Table Microsoft.Manufacturing.Document."Prod. Order Component"
ProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"
Level Integer

InsertOutputItemJnlLine

procedure InsertOutputItemJnlLine(ProdOrderRtngLine: Record "Prod. Order Routing Line", ProdOrderLine: Record "Prod. Order Line")

Parameters

Name Type Description
ProdOrderRtngLine Table Microsoft.Manufacturing.Document."Prod. Order Routing Line"
ProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"

InitSetupValues

procedure InitSetupValues()

SetTemplateAndBatchName

procedure SetTemplateAndBatchName()

SetJnlTemplateAndBatchName

procedure SetJnlTemplateAndBatchName(TemplateName: Code[10], BatchName: Code[10])

Parameters

Name Type Description
TemplateName Code[10]
BatchName Code[10]

DeleteJnlLines

procedure DeleteJnlLines(TemplateName: Code[10], BatchName: Code[10], ProdOrderNo: Code[20], ProdOrderLineNo: Integer)

Parameters

Name Type Description
TemplateName Code[10]
BatchName Code[10]
ProdOrderNo Code[20]
ProdOrderLineNo Integer

ReservEntryExist

procedure ReservEntryExist(ItemJnlLine2: Record "Item Journal Line", var ReservEntry: Record "Reservation Entry"): Boolean

Parameters

Name Type Description
ItemJnlLine2 Table Microsoft.Inventory.Journal."Item Journal Line"
ReservEntry Table Microsoft.Inventory.Tracking."Reservation Entry"

Returns

Type Description
Boolean

SetNextLineNo

procedure SetNextLineNo(var ItemJournalLine: Record "Item Journal Line")

Parameters

Name Type Description
ItemJournalLine Table Microsoft.Inventory.Journal."Item Journal Line"

GetJnlTemplateAndBatchName

procedure GetJnlTemplateAndBatchName(var TemplateName: Code[10], var BatchName: Code[10])

Parameters

Name Type Description
TemplateName Code[10]
BatchName Code[10]

Events

OnAfterCalculateQtyToPostForProdOrder

[IntegrationEvent(False,False)]
local procedure OnAfterCalculateQtyToPostForProdOrder(ProdOrderLine: Record "Prod. Order Line", ProdOrderRoutingLine: Record "Prod. Order Routing Line", var QtyToPost: Decimal)

Parameters

Name Type Description
ProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"
ProdOrderRoutingLine Table Microsoft.Manufacturing.Document."Prod. Order Routing Line"
QtyToPost Decimal

OnAfterDataHasChanged

[IntegrationEvent(False,False)]
local procedure OnAfterDataHasChanged(var ItemJournalLine: Record "Item Journal Line", ProdOrderLineNo: Integer, var HasChanged: Boolean)

Parameters

Name Type Description
ItemJournalLine Table Microsoft.Inventory.Journal."Item Journal Line"
ProdOrderLineNo Integer
HasChanged Boolean

OnAfterInitSetupValues

[IntegrationEvent(False,False)]
local procedure OnAfterInitSetupValues(var PostingDate: Date, var CalcBasedOn: Option)

Parameters

Name Type Description
PostingDate Date
CalcBasedOn Option

OnAfterInsertConsumptionJnlLine

[IntegrationEvent(False,False)]
local procedure OnAfterInsertConsumptionJnlLine(var ItemJournalLine: Record "Item Journal Line")

Parameters

Name Type Description
ItemJournalLine Table Microsoft.Inventory.Journal."Item Journal Line"

OnAfterInsertOutputJnlLine

[IntegrationEvent(False,False)]
local procedure OnAfterInsertOutputJnlLine(var ItemJournalLine: Record "Item Journal Line")

Parameters

Name Type Description
ItemJournalLine Table Microsoft.Inventory.Journal."Item Journal Line"

OnAfterIsLastOperation

[IntegrationEvent(False,False)]
local procedure OnAfterIsLastOperation(ProdOrderRoutingLine: Record "Prod. Order Routing Line", var IsLastOperation: Boolean)

Parameters

Name Type Description
ProdOrderRoutingLine Table Microsoft.Manufacturing.Document."Prod. Order Routing Line"
IsLastOperation Boolean

OnAfterSetTemplateAndBatchName

[IntegrationEvent(False,False)]
local procedure OnAfterSetTemplateAndBatchName(var ItemJournalTemplate: Record "Item Journal Template", var User: Text)

Parameters

Name Type Description
ItemJournalTemplate Table Microsoft.Inventory.Journal."Item Journal Template"
User Text

OnBeforeInsertConsumptionJnlLine

[IntegrationEvent(False,False)]
local procedure OnBeforeInsertConsumptionJnlLine(var ItemJournalLine: Record "Item Journal Line", ProdOrderComp: Record "Prod. Order Component", ProdOrderLine: Record "Prod. Order Line", Level: Integer)

Parameters

Name Type Description
ItemJournalLine Table Microsoft.Inventory.Journal."Item Journal Line"
ProdOrderComp Table Microsoft.Manufacturing.Document."Prod. Order Component"
ProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"
Level Integer

OnBeforeInsertOutputJnlLine

[IntegrationEvent(False,False)]
local procedure OnBeforeInsertOutputJnlLine(var ItemJournalLine: Record "Item Journal Line", ProdOrderRtngLine: Record "Prod. Order Routing Line", ProdOrderLine: Record "Prod. Order Line")

Parameters

Name Type Description
ItemJournalLine Table Microsoft.Inventory.Journal."Item Journal Line"
ProdOrderRtngLine Table Microsoft.Manufacturing.Document."Prod. Order Routing Line"
ProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"

OnBeforeDeleteAllItemJnlLine

[IntegrationEvent(False,False)]
local procedure OnBeforeDeleteAllItemJnlLine(var ItemJournalLine: Record "Item Journal Line")

Parameters

Name Type Description
ItemJournalLine Table Microsoft.Inventory.Journal."Item Journal Line"

OnBeforeHandling

[IntegrationEvent(False,False)]
local procedure OnBeforeHandling(ProdOrder: Record "Production Order", ActualLineNo: Integer, var IsHandled: Boolean)

Parameters

Name Type Description
ProdOrder Table Microsoft.Manufacturing.Document."Production Order"
ActualLineNo Integer
IsHandled Boolean

OnBeforeRecursiveInsertOutputJnlLine

[IntegrationEvent(False,False)]
local procedure OnBeforeRecursiveInsertOutputJnlLine(ProdOrderRoutingLine: Record "Prod. Order Routing Line", ProdOrderLine: Record "Prod. Order Line", var DoRecursion: Boolean, var AdditionalProdOrderLine: Record "Prod. Order Line")

Parameters

Name Type Description
ProdOrderRoutingLine Table Microsoft.Manufacturing.Document."Prod. Order Routing Line"
ProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"
DoRecursion Boolean
AdditionalProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"

OnBeforeRunProductionJnl

[IntegrationEvent(False,False)]
local procedure OnBeforeRunProductionJnl(ToTemplateName: Code[10], ToBatchName: Code[10], ProdOrder: Record "Production Order", ActualLineNo: Integer, var PostingDate: Date, var IsHandled: Boolean)

Parameters

Name Type Description
ToTemplateName Code[10]
ToBatchName Code[10]
ProdOrder Table Microsoft.Manufacturing.Document."Production Order"
ActualLineNo Integer
PostingDate Date
IsHandled Boolean

OnCreateJnlLinesOnAfterFindProdOrderRtngLine

[IntegrationEvent(False,False)]
local procedure OnCreateJnlLinesOnAfterFindProdOrderRtngLine(var ProdOrderRoutingLine: Record "Prod. Order Routing Line", var IsHandled: Boolean, var ItemJnlLine: Record "Item Journal Line", var NextLineNo: Integer)

Parameters

Name Type Description
ProdOrderRoutingLine Table Microsoft.Manufacturing.Document."Prod. Order Routing Line"
IsHandled Boolean
ItemJnlLine Table Microsoft.Inventory.Journal."Item Journal Line"
NextLineNo Integer

OnCreateJnlLinesOnBeforeCheckProdOrderLine

[IntegrationEvent(False,False)]
local procedure OnCreateJnlLinesOnBeforeCheckProdOrderLine(var ProdOrderLine: Record "Prod. Order Line")

Parameters

Name Type Description
ProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"

OnCreateJnlLinesOnAfterProdOrderRtngLineSetFilters

[IntegrationEvent(False,False)]
local procedure OnCreateJnlLinesOnAfterProdOrderRtngLineSetFilters(var ProdOrderRtngLine: Record "Prod. Order Routing Line")

Parameters

Name Type Description
ProdOrderRtngLine Table Microsoft.Manufacturing.Document."Prod. Order Routing Line"

OnInsertConsumptionJnlLineOnBeforeCheck

[IntegrationEvent(False,False)]
local procedure OnInsertConsumptionJnlLineOnBeforeCheck(ProdOrderComponent: Record "Prod. Order Component", ProdOrderLine: Record "Prod. Order Line", Item: Record Item, var IsHandled: Boolean)

Parameters

Name Type Description
ProdOrderComponent Table Microsoft.Manufacturing.Document."Prod. Order Component"
ProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"
Item Table Microsoft.Inventory.Item.Item
IsHandled Boolean

OnInsertConsumptionItemJnlLineOnAfterCalcShouldAdjustQty

[IntegrationEvent(False,False)]
local procedure OnInsertConsumptionItemJnlLineOnAfterCalcShouldAdjustQty(ProdOrderComp: Record "Prod. Order Component", Location: Record Location, var NeededQty: Decimal, var ShouldAdjustQty: Boolean)

Parameters

Name Type Description
ProdOrderComp Table Microsoft.Manufacturing.Document."Prod. Order Component"
Location Table Microsoft.Inventory.Location.Location
NeededQty Decimal
ShouldAdjustQty Boolean

OnInsertConsumptionJnlLineOnAfterItemJnlLineInit

[IntegrationEvent(False,False)]
local procedure OnInsertConsumptionJnlLineOnAfterItemJnlLineInit(var ItemJournalLine: Record "Item Journal Line", ItemJournalTemplate: Record "Item Journal Template", ItemJournalBatch: Record "Item Journal Batch")

Parameters

Name Type Description
ItemJournalLine Table Microsoft.Inventory.Journal."Item Journal Line"
ItemJournalTemplate Table Microsoft.Inventory.Journal."Item Journal Template"
ItemJournalBatch Table Microsoft.Inventory.Journal."Item Journal Batch"

OnInsertConsumptionItemJnlLineOnAfterCopyItemTracking

[IntegrationEvent(False,False)]
local procedure OnInsertConsumptionItemJnlLineOnAfterCopyItemTracking(var ItemJournalLine: Record "Item Journal Line", ItemTrackingCode: Code[10], var NextLineNo: Integer)

Parameters

Name Type Description
ItemJournalLine Table Microsoft.Inventory.Journal."Item Journal Line"
ItemTrackingCode Code[10]
NextLineNo Integer

OnBeforeInsertOutputItemJnlLine

[IntegrationEvent(False,False)]
local procedure OnBeforeInsertOutputItemJnlLine(ProdOrderRtngLine: Record "Prod. Order Routing Line", ProdOrderLine: Record "Prod. Order Line", var IsHandled: Boolean)

Parameters

Name Type Description
ProdOrderRtngLine Table Microsoft.Manufacturing.Document."Prod. Order Routing Line"
ProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"
IsHandled Boolean

OnBeforeDeleteJnlLines

[IntegrationEvent(False,False)]
local procedure OnBeforeDeleteJnlLines(TemplateName: Code[10], BatchName: Code[10], ProdOrderNo: Code[20], ProdOrderLineNo: Integer, var IsHandled: Boolean)

Parameters

Name Type Description
TemplateName Code[10]
BatchName Code[10]
ProdOrderNo Code[20]
ProdOrderLineNo Integer
IsHandled Boolean

OnBeforeSetTemplateAndBatchName

[IntegrationEvent(False,False)]
local procedure OnBeforeSetTemplateAndBatchName(var ToTemplateName: Code[10], var ToBatchName: Code[10], var IsHandled: Boolean, var PageID: Integer, var PageTemplate: Option)

Parameters

Name Type Description
ToTemplateName Code[10]
ToBatchName Code[10]
IsHandled Boolean
PageID Integer
PageTemplate Option

OnInsertConsumptionItemJnlLineOnBeforeValidateQuantity

[IntegrationEvent(False,False)]
local procedure OnInsertConsumptionItemJnlLineOnBeforeValidateQuantity(var ItemJnlLine: Record "Item Journal Line", ProdOrderComp: Record "Prod. Order Component", NeededQty: Decimal, var IsHandled: Boolean)

Parameters

Name Type Description
ItemJnlLine Table Microsoft.Inventory.Journal."Item Journal Line"
ProdOrderComp Table Microsoft.Manufacturing.Document."Prod. Order Component"
NeededQty Decimal
IsHandled Boolean

OnInsertOutputItemJnlLineOnBeforeSubcontractingWorkCenterUsed

[IntegrationEvent(False,False)]
local procedure OnInsertOutputItemJnlLineOnBeforeSubcontractingWorkCenterUsed(var ItemJnlLine: Record "Item Journal Line", ProdOrderLine: Record "Prod. Order Line")

Parameters

Name Type Description
ItemJnlLine Table Microsoft.Inventory.Journal."Item Journal Line"
ProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"

OnInsertOutputItemJnlLineOnAfterCopyItemTracking

[IntegrationEvent(False,False)]
local procedure OnInsertOutputItemJnlLineOnAfterCopyItemTracking(var ItemJnlLine: Record "Item Journal Line", ProdOrderRtngLine: Record "Prod. Order Routing Line", var NextLineNo: Integer)

Parameters

Name Type Description
ItemJnlLine Table Microsoft.Inventory.Journal."Item Journal Line"
ProdOrderRtngLine Table Microsoft.Manufacturing.Document."Prod. Order Routing Line"
NextLineNo Integer

OnInsertOutputItemJnlLineOnAfterItemJnlLineInit

[IntegrationEvent(False,False)]
local procedure OnInsertOutputItemJnlLineOnAfterItemJnlLineInit(var ItemJnlLine: Record "Item Journal Line", ProdOrderLine: Record "Prod. Order Line", ItemJournalTemplate: Record "Item Journal Template", ItemJournalBatch: Record "Item Journal Batch")

Parameters

Name Type Description
ItemJnlLine Table Microsoft.Inventory.Journal."Item Journal Line"
ProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"
ItemJournalTemplate Table Microsoft.Inventory.Journal."Item Journal Template"
ItemJournalBatch Table Microsoft.Inventory.Journal."Item Journal Batch"

OnCreateJnlLinesOnBeforeInsertComponents

[IntegrationEvent(False,False)]
local procedure OnCreateJnlLinesOnBeforeInsertComponents(var ProdOrderRtngLine: Record "Prod. Order Routing Line", ProdOrder: Record "Production Order", ProdOrderLine: Record "Prod. Order Line", var IsHandled: Boolean)

Parameters

Name Type Description
ProdOrderRtngLine Table Microsoft.Manufacturing.Document."Prod. Order Routing Line"
ProdOrder Table Microsoft.Manufacturing.Document."Production Order"
ProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"
IsHandled Boolean

OnInsertComponentsOnAfterProdOrderCompSetFilters

[IntegrationEvent(False,False)]
local procedure OnInsertComponentsOnAfterProdOrderCompSetFilters(var ProdOrderComp: Record "Prod. Order Component")

Parameters

Name Type Description
ProdOrderComp Table Microsoft.Manufacturing.Document."Prod. Order Component"

OnBeforeRoutingLinkValid

[IntegrationEvent(False,False)]
local procedure OnBeforeRoutingLinkValid(ProdOrderComponent: Record "Prod. Order Component", ProdOrderLine: Record "Prod. Order Line", var Result: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
ProdOrderComponent Table Microsoft.Manufacturing.Document."Prod. Order Component"
ProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"
Result Boolean
IsHandled Boolean

OnInsertOutputItemJnlLineOnAfterAssignTimes

[IntegrationEvent(False,False)]
local procedure OnInsertOutputItemJnlLineOnAfterAssignTimes(var ItemJournalLine: Record "Item Journal Line", ProdOrderLine: Record "Prod. Order Line", ProdOrderRoutingLine: Record "Prod. Order Routing Line", var QtyToPost: Decimal)

Parameters

Name Type Description
ItemJournalLine Table Microsoft.Inventory.Journal."Item Journal Line"
ProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"
ProdOrderRoutingLine Table Microsoft.Manufacturing.Document."Prod. Order Routing Line"
QtyToPost Decimal

OnBeforeInsertComponents

[IntegrationEvent(False,False)]
local procedure OnBeforeInsertComponents(ProdOrderLine: Record "Prod. Order Line", CheckRoutingLink: Boolean, Level: Integer, var IsHandled: Boolean)

Parameters

Name Type Description
ProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"
CheckRoutingLink Boolean
Level Integer
IsHandled Boolean

OnCreateJnlLinesOnAfterSetProdOrderLineFilters

[IntegrationEvent(False,False)]
local procedure OnCreateJnlLinesOnAfterSetProdOrderLineFilters(var ProdOrderLine: Record "Prod. Order Line")

Parameters

Name Type Description
ProdOrderLine Table Microsoft.Manufacturing.Document."Prod. Order Line"

OnDeleteJnlLinesOnAfterSetFilters

[IntegrationEvent(False,False)]
local procedure OnDeleteJnlLinesOnAfterSetFilters(var ItemJournalLine: Record "Item Journal Line")

Parameters

Name Type Description
ItemJournalLine Table Microsoft.Inventory.Journal."Item Journal Line"

OnBeforeDataHasChanged

[IntegrationEvent(False,False)]
local procedure OnBeforeDataHasChanged(TemplateName: Code[10], BatchName: Code[10], ProdOrderNo: Code[20], ProdOrderLineNo: Integer, var HasChanged: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
TemplateName Code[10]
BatchName Code[10]
ProdOrderNo Code[20]
ProdOrderLineNo Integer
HasChanged Boolean
IsHandled Boolean

See also