Codeunit "ServLedgEntries-Post"

ID 5912
Namespace: Microsoft.Service.Posting

Properties

Name Value
Permissions TableData "Service Ledger Entry" = rimd, TableData "Warranty Ledger Entry" = rimd, TableData "Service Register" = rimd

Methods

InitServiceRegister

procedure InitServiceRegister(var PassedServEntryNo: Integer, var PassedWarrantyEntryNo: Integer)

Parameters

Name Type Description
PassedServEntryNo Integer
PassedWarrantyEntryNo Integer

FinishServiceRegister

procedure FinishServiceRegister(var PassedServEntryNo: Integer, var PassedWarrantyEntryNo: Integer)

Parameters

Name Type Description
PassedServEntryNo Integer
PassedWarrantyEntryNo Integer

InsertServLedgerEntry

procedure InsertServLedgerEntry(var NextEntryNo: Integer, var ServHeader: Record "Service Header", var TempServLine: Record "Service Line", var ServItemLine: Record "Service Item Line", Qty: Decimal, DocNo: Code[20]): Integer

Parameters

Name Type Description
NextEntryNo Integer
ServHeader Table Microsoft.Service.Document."Service Header"
TempServLine Table Microsoft.Service.Document."Service Line"
ServItemLine Table Microsoft.Service.Document."Service Item Line"
Qty Decimal
DocNo Code[20]

Returns

Type Description
Integer

InsertServLedgerEntrySale

procedure InsertServLedgerEntrySale(var PassedNextEntryNo: Integer, var ServHeader: Record "Service Header", var ServLine: Record "Service Line", var ServItemLine: Record "Service Item Line", Qty: Decimal, QtyToCharge: Decimal, GenJnlLineDocNo: Code[20], DocLineNo: Integer)

Parameters

Name Type Description
PassedNextEntryNo Integer
ServHeader Table Microsoft.Service.Document."Service Header"
ServLine Table Microsoft.Service.Document."Service Line"
ServItemLine Table Microsoft.Service.Document."Service Item Line"
Qty Decimal
QtyToCharge Decimal
GenJnlLineDocNo Code[20]
DocLineNo Integer

InsertWarrantyLedgerEntry

procedure InsertWarrantyLedgerEntry(var PassedWarrantyEntryNo: Integer, var ServHeader: Record "Service Header", var ServLine: Record "Service Line", var ServItemLine: Record "Service Item Line", Qty: Decimal, GenJnlLineDocNo: Code[20]): Integer

Parameters

Name Type Description
PassedWarrantyEntryNo Integer
ServHeader Table Microsoft.Service.Document."Service Header"
ServLine Table Microsoft.Service.Document."Service Line"
ServItemLine Table Microsoft.Service.Document."Service Item Line"
Qty Decimal
GenJnlLineDocNo Code[20]

Returns

Type Description
Integer

ReverseCnsmServLedgEntries

procedure ReverseCnsmServLedgEntries(ServiceShipmentLine: Record "Service Shipment Line")

Parameters

Name Type Description
ServiceShipmentLine Table Microsoft.Service.History."Service Shipment Line"

UnapplyOpenServiceLines

procedure UnapplyOpenServiceLines(var ServiceLine: Record "Service Line")

Parameters

Name Type Description
ServiceLine Table Microsoft.Service.Document."Service Line"

ReverseServLedgEntry

procedure ReverseServLedgEntry(var ServShptLine: Record "Service Shipment Line")

Parameters

Name Type Description
ServShptLine Table Microsoft.Service.History."Service Shipment Line"

ReverseWarrantyEntry

procedure ReverseWarrantyEntry(var ServShptLine: Record "Service Shipment Line")

Parameters

Name Type Description
ServShptLine Table Microsoft.Service.History."Service Shipment Line"

CreateCreditEntry

procedure CreateCreditEntry(var PassedNextEntryNo: Integer, var ServHeader: Record "Service Header", var ServLine: Record "Service Line", GenJnlLineDocNo: Code[20])

Parameters

Name Type Description
PassedNextEntryNo Integer
ServHeader Table Microsoft.Service.Document."Service Header"
ServLine Table Microsoft.Service.Document."Service Line"
GenJnlLineDocNo Code[20]

CalcDivideAmount

procedure CalcDivideAmount(Qty: Decimal, var PassedServHeader: Record "Service Header", var PassedTempServLine: Record "Service Line", var PassedVATAmountLine: Record "VAT Amount Line")

Parameters

Name Type Description
Qty Decimal
PassedServHeader Table Microsoft.Service.Document."Service Header"
PassedTempServLine Table Microsoft.Service.Document."Service Line"
PassedVATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

Events

OnBeforeCopyServicedInfoCrMemoUsage

[IntegrationEvent(False,False)]
local procedure OnBeforeCopyServicedInfoCrMemoUsage(var ServiceLedgerEntry: Record "Service Ledger Entry", var ServiceLine: Record "Service Line", var IsHandled: Boolean)

Parameters

Name Type Description
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServiceLine Table Microsoft.Service.Document."Service Line"
IsHandled Boolean

OnBeforeCreateCreditEntry

[IntegrationEvent(False,False)]
local procedure OnBeforeCreateCreditEntry(var ServiceDocumentRegister: Record "Service Document Register", var ServiceLine: Record "Service Line", var ServiceHeader: Record "Service Header", var ServiceLedgerEntry: Record "Service Ledger Entry", var GenJnlLineDocNo: Code[20], var ServDocType: Integer, var PassedNextEntryNo: Integer, var ServDocNo: Code[20], var IsHandled: Boolean)

Parameters

Name Type Description
ServiceDocumentRegister Table Microsoft.Service.Document."Service Document Register"
ServiceLine Table Microsoft.Service.Document."Service Line"
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
GenJnlLineDocNo Code[20]
ServDocType Integer
PassedNextEntryNo Integer
ServDocNo Code[20]
IsHandled Boolean

OnBeforeInsertServLedgerEntryCrMUsage

[IntegrationEvent(False,False)]
local procedure OnBeforeInsertServLedgerEntryCrMUsage(var NextEntryNo: Integer, var ServiceHeader: Record "Service Header", var ServiceLine: Record "Service Line", DocNo: Code[20], var IsHandled: Boolean)

Parameters

Name Type Description
NextEntryNo Integer
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceLine Table Microsoft.Service.Document."Service Line"
DocNo Code[20]
IsHandled Boolean

OnBeforeServLedgerEntryInsert

[IntegrationEvent(False,False)]
local procedure OnBeforeServLedgerEntryInsert(var ServiceLedgerEntry: Record "Service Ledger Entry", ServiceLine: Record "Service Line", ServiceItemLine: Record "Service Item Line", ServiceHeader: Record "Service Header")

Parameters

Name Type Description
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServiceLine Table Microsoft.Service.Document."Service Line"
ServiceItemLine Table Microsoft.Service.Document."Service Item Line"
ServiceHeader Table Microsoft.Service.Document."Service Header"

OnBeforeServLedgerEntrySaleInsert

[IntegrationEvent(False,False)]
local procedure OnBeforeServLedgerEntrySaleInsert(var ServiceLedgerEntry: Record "Service Ledger Entry", ServiceLine: Record "Service Line", ServiceItemLine: Record "Service Item Line", ServiceHeader: Record "Service Header")

Parameters

Name Type Description
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServiceLine Table Microsoft.Service.Document."Service Line"
ServiceItemLine Table Microsoft.Service.Document."Service Item Line"
ServiceHeader Table Microsoft.Service.Document."Service Header"

OnBeforeWarrantyLedgerEntryInsert

[IntegrationEvent(False,False)]
local procedure OnBeforeWarrantyLedgerEntryInsert(var WarrantyLedgerEntry: Record "Warranty Ledger Entry", ServiceLine: Record "Service Line")

Parameters

Name Type Description
WarrantyLedgerEntry Table Microsoft.Service.Ledger."Warranty Ledger Entry"
ServiceLine Table Microsoft.Service.Document."Service Line"

OnInsertServLedgEntryCrMemoOnBeforeServLedgEntryInsert

[IntegrationEvent(False,False)]
local procedure OnInsertServLedgEntryCrMemoOnBeforeServLedgEntryInsert(var ServiceLedgerEntry: Record "Service Ledger Entry", ServiceHeader: Record "Service Header", ServiceLine: Record "Service Line")

Parameters

Name Type Description
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceLine Table Microsoft.Service.Document."Service Line"

OnInsertServLedgerEntryCrMUsageOnBeforeServLedgEntryInsert

[IntegrationEvent(False,False)]
local procedure OnInsertServLedgerEntryCrMUsageOnBeforeServLedgEntryInsert(var ServiceLedgerEntry: Record "Service Ledger Entry", ServiceHeader: Record "Service Header", ServiceLine: Record "Service Line")

Parameters

Name Type Description
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceLine Table Microsoft.Service.Document."Service Line"

OnInsertServLedgerEntryOnBeforeCopyServicedInfoFromServiceItemLine

[IntegrationEvent(False,False)]
local procedure OnInsertServLedgerEntryOnBeforeCopyServicedInfoFromServiceItemLine(var ServLedgEntry: Record "Service Ledger Entry", var TempServLine: Record "Service Line", var IsHandled: Boolean)

Parameters

Name Type Description
ServLedgEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
TempServLine Table Microsoft.Service.Document."Service Line"
IsHandled Boolean

OnCreateCreditEntryOnBeforeServLedgEntryInsert

[IntegrationEvent(False,False)]
local procedure OnCreateCreditEntryOnBeforeServLedgEntryInsert(var ServiceLedgerEntry: Record "Service Ledger Entry", ServiceHeader: Record "Service Header", ServiceLine: Record "Service Line")

Parameters

Name Type Description
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceLine Table Microsoft.Service.Document."Service Line"

OnCreateCreditEntryOnBeforeServDocRegServiceDocument

[IntegrationEvent(False,False)]
local procedure OnCreateCreditEntryOnBeforeServDocRegServiceDocument(var ServiceLedgerEntry: Record "Service Ledger Entry", var ServiceHeader: Record "Service Header", var ServiceLine: Record "Service Line")

Parameters

Name Type Description
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceLine Table Microsoft.Service.Document."Service Line"

OnCreateCreditEntryOnBeforeServLedgEntryInsertFromServiceHeader

[IntegrationEvent(False,False)]
local procedure OnCreateCreditEntryOnBeforeServLedgEntryInsertFromServiceHeader(var ServiceLedgerEntry: Record "Service Ledger Entry", ServiceHeader: Record "Service Header", ServiceLine: Record "Service Line")

Parameters

Name Type Description
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceLine Table Microsoft.Service.Document."Service Line"

OnCopyServicedInfoFromServiceItemLineOnAfterCopyServicedInfo

[IntegrationEvent(False,False)]
local procedure OnCopyServicedInfoFromServiceItemLineOnAfterCopyServicedInfo(var ServiceLedgerEntry: Record "Service Ledger Entry", ServiceItemLine: Record "Service Item Line")

Parameters

Name Type Description
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServiceItemLine Table Microsoft.Service.Document."Service Item Line"

OnCopyServicedInfoFromServiceItemOnAfterCopyServicedInfo

[IntegrationEvent(False,False)]
local procedure OnCopyServicedInfoFromServiceItemOnAfterCopyServicedInfo(var ServiceLedgerEntry: Record "Service Ledger Entry", ServiceItem: Record "Service Item")

Parameters

Name Type Description
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServiceItem Table Microsoft.Service.Item."Service Item"

OnCopyServicedInfoFromServiceLedgerEntryOnAfterCopyServicedInfo

[IntegrationEvent(False,False)]
local procedure OnCopyServicedInfoFromServiceLedgerEntryOnAfterCopyServicedInfo(var ServiceLedgerEntry: Record "Service Ledger Entry", SourceServiceLedgerEntry: Record "Service Ledger Entry")

Parameters

Name Type Description
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
SourceServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"

OnInsertServLedgerEntrySaleOnBeforeCloseEntries

[IntegrationEvent(False,False)]
local procedure OnInsertServLedgerEntrySaleOnBeforeCloseEntries(var ServiceLedgerEntry: Record "Service Ledger Entry", var ApplyToServLedgEntry: Record "Service Ledger Entry", var ServiceLine: Record "Service Line", var ServHeader: Record "Service Header")

Parameters

Name Type Description
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ApplyToServLedgEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServiceLine Table Microsoft.Service.Document."Service Line"
ServHeader Table Microsoft.Service.Document."Service Header"

OnInsertServLedgerEntrySaleOnAfterCopyFromServItemLine

[IntegrationEvent(False,False)]
local procedure OnInsertServLedgerEntrySaleOnAfterCopyFromServItemLine(var ServLedgEntry: Record "Service Ledger Entry", var ServItemLine: Record "Service Item Line")

Parameters

Name Type Description
ServLedgEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServItemLine Table Microsoft.Service.Document."Service Item Line"

OnReverseWarrantyEntryOnBeforeNewWarrantyLedgEntryInsert

[IntegrationEvent(False,False)]
local procedure OnReverseWarrantyEntryOnBeforeNewWarrantyLedgEntryInsert(var NewWarrantyLedgerEntry: Record "Warranty Ledger Entry", var WarrantyLedgerEntry: Record "Warranty Ledger Entry")

Parameters

Name Type Description
NewWarrantyLedgerEntry Table Microsoft.Service.Ledger."Warranty Ledger Entry"
WarrantyLedgerEntry Table Microsoft.Service.Ledger."Warranty Ledger Entry"

OnReverseServLedgEntryOnBeforeNewServLedgEntryInsert

[IntegrationEvent(False,False)]
local procedure OnReverseServLedgEntryOnBeforeNewServLedgEntryInsert(var NewServLedgEntry: Record "Service Ledger Entry", var ServLedgEntry: Record "Service Ledger Entry", ServiceShipmentLine: Record "Service Shipment Line")

Parameters

Name Type Description
NewServLedgEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServLedgEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServiceShipmentLine Table Microsoft.Service.History."Service Shipment Line"

OnBeforeInsertServLedgerEntry

[IntegrationEvent(False,False)]
local procedure OnBeforeInsertServLedgerEntry(var NextEntryNo: Integer, var ServiceHeader: Record "Service Header", var TempServiceLine: Record "Service Line", var ServiceItemLine: Record "Service Item Line", Qty: Decimal, DocNo: Code[20], var Result: Integer, var IsHandled: Boolean)

Parameters

Name Type Description
NextEntryNo Integer
ServiceHeader Table Microsoft.Service.Document."Service Header"
TempServiceLine Table Microsoft.Service.Document."Service Line"
ServiceItemLine Table Microsoft.Service.Document."Service Item Line"
Qty Decimal
DocNo Code[20]
Result Integer
IsHandled Boolean

OnBeforeInsertServLedgerEntrySale

[IntegrationEvent(False,False)]
local procedure OnBeforeInsertServLedgerEntrySale(var PassedNextEntryNo: Integer, var ServiceHeader: Record "Service Header", var ServiceLine: Record "Service Line", var ServiceItemLine: Record "Service Item Line", var ServiceLedgerEntry: Record "Service Ledger Entry", Qty: Decimal, QtyToCharge: Decimal, GenJnlLineDocNo: Code[20], DocLineNo: Integer, var IsHandled: Boolean)

Parameters

Name Type Description
PassedNextEntryNo Integer
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceLine Table Microsoft.Service.Document."Service Line"
ServiceItemLine Table Microsoft.Service.Document."Service Item Line"
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
Qty Decimal
QtyToCharge Decimal
GenJnlLineDocNo Code[20]
DocLineNo Integer
IsHandled Boolean

OnBeforeInsertServLedgEntryCrMemo

[IntegrationEvent(False,False)]
local procedure OnBeforeInsertServLedgEntryCrMemo(var PassedNextEntryNo: Integer, var ServiceHeader: Record "Service Header", var ServiceLine: Record "Service Line", GenJnlLineDocNo: Code[20], var IsHandled: Boolean)

Parameters

Name Type Description
PassedNextEntryNo Integer
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceLine Table Microsoft.Service.Document."Service Line"
GenJnlLineDocNo Code[20]
IsHandled Boolean

OnAfterInitServiceRegister

[IntegrationEvent(False,False)]
local procedure OnAfterInitServiceRegister(var ServiceRegister: Record "Service Register")

Parameters

Name Type Description
ServiceRegister Table Microsoft.Service.Ledger."Service Register"

OnBeforeFinishServiceRegister

[IntegrationEvent(False,False)]
local procedure OnBeforeFinishServiceRegister(var ServiceRegister: Record "Service Register")

Parameters

Name Type Description
ServiceRegister Table Microsoft.Service.Ledger."Service Register"

OnAfterReverseOpenServiceLedgerEntry

[IntegrationEvent(False,False)]
local procedure OnAfterReverseOpenServiceLedgerEntry(var ServiceLedgerEntry: Record "Service Ledger Entry", var NextServLedgerEntryNo: Integer)

Parameters

Name Type Description
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
NextServLedgerEntryNo Integer

See also