Share via


Codeunit ServContractManagement

ID 5940
Namespace: Microsoft.Service.Contract

Properties

Name Value
Permissions TableData "Service Ledger Entry" = rimd, TableData "Warranty Ledger Entry" = rimd, TableData "Service Register" = rimd, TableData "Contract Change Log" = rimd, TableData "Contract Gain/Loss Entry" = rimd
TableNo Table Microsoft.Service.Contract."Service Contract Header"

Methods

CreateInvoice

procedure CreateInvoice(ServiceContractHeader: Record "Service Contract Header"): Code[20]

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

Returns

Type Description
Code[20]

CreateServiceLedgEntry

procedure CreateServiceLedgEntry(ServHeader2: Record "Service Header", ContractType: Enum "Service Contract Type", ContractNo: Code[20], InvFromDate: Date, InvToDate: Date, SigningContract: Boolean, AddingNewLines: Boolean, LineNo: Integer): Integer

Parameters

Name Type Description
ServHeader2 Table Microsoft.Service.Document."Service Header"
ContractType Enum Microsoft.Service.Contract."Service Contract Type"
ContractNo Code[20]
InvFromDate Date
InvToDate Date
SigningContract Boolean
AddingNewLines Boolean
LineNo Integer

Returns

Type Description
Integer

UpdateServLedgEntryAmounts

procedure UpdateServLedgEntryAmounts(var ServContractLine: Record "Service Contract Line", var Currency: Record Currency, var InvRoundedAmount: array[4] of Decimal, LineInvFrom: Date, InvTo: Date)

Parameters

Name Type Description
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"
Currency Table Microsoft.Finance.Currency.Currency
InvRoundedAmount array[4] of Decimal
LineInvFrom Date
InvTo Date

CalcServLedgEntryDiscountPct

procedure CalcServLedgEntryDiscountPct(var ServiceLedgerEntry: Record "Service Ledger Entry")

Parameters

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

CreateServHeader

procedure CreateServHeader(ServContract2: Record "Service Contract Header", PostDate: Date, ContractExists: Boolean): Code[20]

Parameters

Name Type Description
ServContract2 Table Microsoft.Service.Contract."Service Contract Header"
PostDate Date
ContractExists Boolean

Returns

Type Description
Code[20]

CreateServiceLine

procedure CreateServiceLine(ServHeader: Record "Service Header", ContractType: Enum "Service Contract Type", ContractNo: Code[20], InvFromDate: Date, InvToDate: Date, ServiceApplyEntry: Integer, SignningContract: Boolean)

Parameters

Name Type Description
ServHeader Table Microsoft.Service.Document."Service Header"
ContractType Enum Microsoft.Service.Contract."Service Contract Type"
ContractNo Code[20]
InvFromDate Date
InvToDate Date
ServiceApplyEntry Integer
SignningContract Boolean

CreateDetailedServiceLine

procedure CreateDetailedServiceLine(ServHeader: Record "Service Header", ServContractLine: Record "Service Contract Line", ContractType: Enum "Service Contract Type", ContractNo: Code[20])

Parameters

Name Type Description
ServHeader Table Microsoft.Service.Document."Service Header"
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"
ContractType Enum Microsoft.Service.Contract."Service Contract Type"
ContractNo Code[20]

CreateLastServiceLines

procedure CreateLastServiceLines(ServHeader: Record "Service Header", ContractType: Enum "Service Contract Type", ContractNo: Code[20])

Parameters

Name Type Description
ServHeader Table Microsoft.Service.Document."Service Header"
ContractType Enum Microsoft.Service.Contract."Service Contract Type"
ContractNo Code[20]

CreateContractLineCreditMemo

procedure CreateContractLineCreditMemo(var FromServiceContractLine: Record "Service Contract Line", Deleting: Boolean): Code[20]

Parameters

Name Type Description
FromServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"
Deleting Boolean

Returns

Type Description
Code[20]

CheckContractGroupAccounts

procedure CheckContractGroupAccounts(ServContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServContractHeader Table Microsoft.Service.Contract."Service Contract Header"

FindFirstPrepaidTransaction

procedure FindFirstPrepaidTransaction(ContractNo: Code[20]): Date

Parameters

Name Type Description
ContractNo Code[20]

Returns

Type Description
Date

GetNextInvoicePeriod

procedure GetNextInvoicePeriod(InvoicedServContractHeader: Record "Service Contract Header", var InvFrom: Date, var InvTo: Date)

Parameters

Name Type Description
InvoicedServContractHeader Table Microsoft.Service.Contract."Service Contract Header"
InvFrom Date
InvTo Date

NoOfDayInYear

procedure NoOfDayInYear(InputDate: Date): Integer

Parameters

Name Type Description
InputDate Date

Returns

Type Description
Integer

NoOfMonthsAndDaysInPeriod

procedure NoOfMonthsAndDaysInPeriod(Day1: Date, Day2: Date, var NoOfMonthsInPeriod: Integer, var NoOfDaysInPeriod: Integer)

Parameters

Name Type Description
Day1 Date
Day2 Date
NoOfMonthsInPeriod Integer
NoOfDaysInPeriod Integer

NoOfMonthsAndMPartsInPeriod

procedure NoOfMonthsAndMPartsInPeriod(Day1: Date, Day2: Date): Decimal

Parameters

Name Type Description
Day1 Date
Day2 Date

Returns

Type Description
Decimal

CalcContractAmount

procedure CalcContractAmount(ServContractHeader: Record "Service Contract Header", PeriodStarts: Date, PeriodEnds: Date): Decimal

Parameters

Name Type Description
ServContractHeader Table Microsoft.Service.Contract."Service Contract Header"
PeriodStarts Date
PeriodEnds Date

Returns

Type Description
Decimal

CalcContractLineAmount

procedure CalcContractLineAmount(AnnualAmount: Decimal, PeriodStarts: Date, PeriodEnds: Date): Decimal

Parameters

Name Type Description
AnnualAmount Decimal
PeriodStarts Date
PeriodEnds Date

Returns

Type Description
Decimal

CreateRemainingPeriodInvoice

procedure CreateRemainingPeriodInvoice(var CurrServContract: Record "Service Contract Header"): Code[20]

Parameters

Name Type Description
CurrServContract Table Microsoft.Service.Contract."Service Contract Header"

Returns

Type Description
Code[20]

InitCodeUnit

procedure InitCodeUnit()

FinishCodeunit

procedure FinishCodeunit()

CopyCheckSCDimToTempSCDim

procedure CopyCheckSCDimToTempSCDim(ServContract: Record "Service Contract Header")

Parameters

Name Type Description
ServContract Table Microsoft.Service.Contract."Service Contract Header"

CreateAllServLines

procedure CreateAllServLines(InvNo: Code[20], ServContractToInvoice: Record "Service Contract Header")

Parameters

Name Type Description
InvNo Code[20]
ServContractToInvoice Table Microsoft.Service.Contract."Service Contract Header"

CheckIfServiceExist

procedure CheckIfServiceExist(ServContractHeader: Record "Service Contract Header"): Boolean

Parameters

Name Type Description
ServContractHeader Table Microsoft.Service.Contract."Service Contract Header"

Returns

Type Description
Boolean

GetAffectedItemsOnContractChange

procedure GetAffectedItemsOnContractChange(ContractNoToBeChanged: Code[20], var TempServContract: Record "Service Contract Header", var TempServItem: Record "Service Item", Recursive: Boolean, ContractTypeToBeChanged: Enum "Service Contract Type")

Parameters

Name Type Description
ContractNoToBeChanged Code[20]
TempServContract Table Microsoft.Service.Contract."Service Contract Header"
TempServItem Table Microsoft.Service.Item."Service Item"
Recursive Boolean
ContractTypeToBeChanged Enum Microsoft.Service.Contract."Service Contract Type"

ChangeCustNoOnServContract

procedure ChangeCustNoOnServContract(NewCustomertNo: Code[20], NewShipToCode: Code[10], ServContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
NewCustomertNo Code[20]
NewShipToCode Code[10]
ServContractHeader Table Microsoft.Service.Contract."Service Contract Header"

ChangeCustNoOnServItem

procedure ChangeCustNoOnServItem(NewCustomertNo: Code[20], NewShipToCode: Code[10], ServItem: Record "Service Item")

Parameters

Name Type Description
NewCustomertNo Code[20]
NewShipToCode Code[10]
ServItem Table Microsoft.Service.Item."Service Item"

CreateHeadingServiceLine

procedure CreateHeadingServiceLine(ServHeader: Record "Service Header", ContractType: Enum "Service Contract Type", ContractNo: Code[20])

Parameters

Name Type Description
ServHeader Table Microsoft.Service.Document."Service Header"
ContractType Enum Microsoft.Service.Contract."Service Contract Type"
ContractNo Code[20]

LookupServItemNo

procedure LookupServItemNo(var ServiceContractLine: Record "Service Contract Line")

Parameters

Name Type Description
ServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"

AmountToFCY

procedure AmountToFCY(AmountLCY: Decimal, var ServHeader3: Record "Service Header"): Decimal

Parameters

Name Type Description
AmountLCY Decimal
ServHeader3 Table Microsoft.Service.Document."Service Header"

Returns

Type Description
Decimal

IsYearContract

procedure IsYearContract(ContractType: Enum "Service Contract Type", ContrNo: Code[20]): Boolean

Parameters

Name Type Description
ContractType Enum Microsoft.Service.Contract."Service Contract Type"
ContrNo Code[20]

Returns

Type Description
Boolean

CheckServiceContractHeaderAmts

procedure CheckServiceContractHeaderAmts(ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

SetServiceLedgerEntryUnitCost

procedure SetServiceLedgerEntryUnitCost(var ServiceLedgerEntry: Record "Service Ledger Entry")

Parameters

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

CheckMultipleCurrenciesForCustomers

procedure CheckMultipleCurrenciesForCustomers(var ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

CheckCustomerCurrencyCombination

procedure CheckCustomerCurrencyCombination(var ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

InitServLedgEntry

procedure InitServLedgEntry(var ServLedgEntry: Record "Service Ledger Entry", ServContractHeader: Record "Service Contract Header", DocNo: Code[20])

Parameters

Name Type Description
ServLedgEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServContractHeader Table Microsoft.Service.Contract."Service Contract Header"
DocNo Code[20]

GetInvoicePeriodText

procedure GetInvoicePeriodText(InvoicePeriod: Enum "Service Contract Header Invoice Period"): Text[4]

Parameters

Name Type Description
InvoicePeriod Enum Microsoft.Service.Contract."Service Contract Header Invoice Period"

Returns

Type Description
Text[4]

FilterServiceContractLine

procedure FilterServiceContractLine(var ServContractLine: Record "Service Contract Line", ContractNo: Code[20], ContractType: Enum "Service Contract Type", LineNo: Integer)

Parameters

Name Type Description
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"
ContractNo Code[20]
ContractType Enum Microsoft.Service.Contract."Service Contract Type"
LineNo Integer

UpdateServLedgEntryAmount

procedure UpdateServLedgEntryAmount(var ServLedgEntry: Record "Service Ledger Entry", var ServHeader: Record "Service Header")

Parameters

Name Type Description
ServLedgEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServHeader Table Microsoft.Service.Document."Service Header"

CalcInvoicedToDate

procedure CalcInvoicedToDate(var ServContractLine: Record "Service Contract Line", InvFrom: Date, InvTo: Date)

Parameters

Name Type Description
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"
InvFrom Date
InvTo Date

SetServLedgEntryAmounts

procedure SetServLedgEntryAmounts(var ServLedgEntry: Record "Service Ledger Entry", var EntryAmount: array[4] of Decimal, Amount: Decimal, UnitPrice: Decimal, CostAmount: Decimal, DiscAmount: Decimal, AmtRoundingPrecision: Decimal)

Parameters

Name Type Description
ServLedgEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
EntryAmount array[4] of Decimal
Amount Decimal
UnitPrice Decimal
CostAmount Decimal
DiscAmount Decimal
AmtRoundingPrecision Decimal

CalcInvAmounts

procedure CalcInvAmounts(var InvAmount: array[4] of Decimal, ServContractLine: Record "Service Contract Line", InvFrom: Date, InvTo: Date)

Parameters

Name Type Description
InvAmount array[4] of Decimal
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"
InvFrom Date
InvTo Date

InsertMultipleServLedgEntries

procedure InsertMultipleServLedgEntries(var NoOfPayments: Integer, var DueDate: Date, var NonDistrAmount: array[4] of Decimal, var InvRoundedAmount: array[4] of Decimal, var ServHeader: Record "Service Header", InvFrom: Date, NextInvDate: Date, AddingNewLines: Boolean, CountOfEntryLoop: Integer, ServContractLine: Record "Service Contract Line", AmountRoundingPrecision: Decimal)

Parameters

Name Type Description
NoOfPayments Integer
DueDate Date
NonDistrAmount array[4] of Decimal
InvRoundedAmount array[4] of Decimal
ServHeader Table Microsoft.Service.Document."Service Header"
InvFrom Date
NextInvDate Date
AddingNewLines Boolean
CountOfEntryLoop Integer
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"
AmountRoundingPrecision Decimal

Events

OnAfterCalcContractLineAmount

[IntegrationEvent(False,False)]
local procedure OnAfterCalcContractLineAmount(AnnualAmount: Decimal, PeriodStarts: Date, PeriodEnds: Date, var AmountCalculated: Decimal)

Parameters

Name Type Description
AnnualAmount Decimal
PeriodStarts Date
PeriodEnds Date
AmountCalculated Decimal

OnAfterCreateAllServLines

[IntegrationEvent(False,False)]
local procedure OnAfterCreateAllServLines(ServiceContractHeader: Record "Service Contract Header", var ServContractLine: Record "Service Contract Line", var ServHeader: Record "Service Header")

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"
ServHeader Table Microsoft.Service.Document."Service Header"

OnAfterCreateDetailedServiceLine

[IntegrationEvent(False,False)]
local procedure OnAfterCreateDetailedServiceLine(ServiceHeader: Record "Service Header", ServiceContractLine: Record "Service Contract Line", NewContract: Boolean, ServiceContractHeader: Record "Service Contract Header", var ServLineNo: Integer)

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"
NewContract Boolean
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
ServLineNo Integer

OnAfterCreateInvoice

[IntegrationEvent(False,False)]
local procedure OnAfterCreateInvoice(var ServiceContractHeader: Record "Service Contract Header", PostingDate: Date)

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
PostingDate Date

OnAfterCreateInvoiceSetPostingDate

[IntegrationEvent(False,False)]
local procedure OnAfterCreateInvoiceSetPostingDate(ServiceContractHeader: Record "Service Contract Header", InvoiceFromDate: Date, InvoiceToDate: Date, var PostingDate: Date)

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
InvoiceFromDate Date
InvoiceToDate Date
PostingDate Date

OnAfterCreateServHeader

[IntegrationEvent(False,False)]
local procedure OnAfterCreateServHeader(var ServiceHeader: Record "Service Header", ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

OnAfterInsertServiceHeader

[IntegrationEvent(False,False)]
local procedure OnAfterInsertServiceHeader(var ServiceHeader: Record "Service Header", var ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

OnAfterProcessShiptoCodeChange

[IntegrationEvent(False,False)]
local procedure OnAfterProcessShiptoCodeChange(var ServiceContractHeader: Record "Service Contract Header", NewShipToCode: Code[10])

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
NewShipToCode Code[10]

OnBeforeCalcInvAmounts

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcInvAmounts(var InvAmount: array[4] of Decimal, var ServiceContractLine: Record "Service Contract Line", InvFrom: Date, InvTo: Date, var IsHandled: Boolean)

Parameters

Name Type Description
InvAmount array[4] of Decimal
ServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"
InvFrom Date
InvTo Date
IsHandled Boolean

OnBeforeCreateDescriptionServiceLines

[IntegrationEvent(False,False)]
local procedure OnBeforeCreateDescriptionServiceLines(ServContractLineItemNo: Code[20], ServContractLineDesc: Text[100], ServContractLineItemSerialNo: Code[50], var IsHandled: Boolean)

Parameters

Name Type Description
ServContractLineItemNo Code[20]
ServContractLineDesc Text[100]
ServContractLineItemSerialNo Code[50]
IsHandled Boolean

OnBeforeCreateServiceLine

[IntegrationEvent(False,False)]
local procedure OnBeforeCreateServiceLine(ServiceHeader: Record "Service Header", ContractType: Enum "Service Contract Type", ContractNo: Code[20], InvFromDate: Date, InvToDate: Date, ServiceApplyEntry: Integer, SigningContract: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ContractType Enum Microsoft.Service.Contract."Service Contract Type"
ContractNo Code[20]
InvFromDate Date
InvToDate Date
ServiceApplyEntry Integer
SigningContract Boolean
IsHandled Boolean

OnBeforeChangeCustNoOnServItem

[IntegrationEvent(False,False)]
local procedure OnBeforeChangeCustNoOnServItem(var ServiceItem: Record "Service Item", NewCustomerNo: Code[20], var IsHandled: Boolean)

Parameters

Name Type Description
ServiceItem Table Microsoft.Service.Item."Service Item"
NewCustomerNo Code[20]
IsHandled Boolean

OnBeforeCheckContractGroupAccounts

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckContractGroupAccounts(ServContractHeader: Record "Service Contract Header", var IsHandled: Boolean)

Parameters

Name Type Description
ServContractHeader Table Microsoft.Service.Contract."Service Contract Header"
IsHandled Boolean

OnBeforeCreateServLineForNewContract

[IntegrationEvent(False,False)]
local procedure OnBeforeCreateServLineForNewContract(var ServiceHeader: Record "Service Header", ServiceContractHeader: Record "Service Contract Header", var ServLineNo: Integer)

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
ServLineNo Integer

OnBeforeCreateDetailedServiceLine

[IntegrationEvent(False,False)]
local procedure OnBeforeCreateDetailedServiceLine(ServiceHeader: Record "Service Header", var IsHandled: Boolean, ContractType: Enum "Service Contract Type", ContractNo: Code[20])

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
IsHandled Boolean
ContractType Enum Microsoft.Service.Contract."Service Contract Type"
ContractNo Code[20]

OnBeforeCreateHeadingServiceLine

[IntegrationEvent(False,False)]
local procedure OnBeforeCreateHeadingServiceLine(ServiceHeader: Record "Service Header", var IsHandled: Boolean, ContractType: Enum "Service Contract Type", ContractNo: Code[20])

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
IsHandled Boolean
ContractType Enum Microsoft.Service.Contract."Service Contract Type"
ContractNo Code[20]

OnBeforeInitServiceLineAppliedGLAccount

[IntegrationEvent(False,False)]
local procedure OnBeforeInitServiceLineAppliedGLAccount(var ServLine: Record "Service Line", AppliedGLAccount: Code[20], var IsHandled: Boolean)

Parameters

Name Type Description
ServLine Table Microsoft.Service.Document."Service Line"
AppliedGLAccount Code[20]
IsHandled Boolean

OnBeforeInsertDescriptionServiceLine

[IntegrationEvent(False,False)]
local procedure OnBeforeInsertDescriptionServiceLine(var ServLine: Record "Service Line", Description: Text[100], var IsHandled: Boolean)

Parameters

Name Type Description
ServLine Table Microsoft.Service.Document."Service Line"
Description Text[100]
IsHandled Boolean

OnBeforeInsertMultipleServLedgEntries

[IntegrationEvent(False,False)]
local procedure OnBeforeInsertMultipleServLedgEntries(var ServLedgEntry: Record "Service Ledger Entry", ServContractLine: Record "Service Contract Line")

Parameters

Name Type Description
ServLedgEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"

OnBeforeServContractHeaderModify

[IntegrationEvent(False,False)]
local procedure OnBeforeServContractHeaderModify(var ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

OnBeforeLastServLineModify

[IntegrationEvent(False,False)]
local procedure OnBeforeLastServLineModify(var ServiceLine: Record "Service Line")

Parameters

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

OnBeforeServHeaderModify

[IntegrationEvent(False,False)]
local procedure OnBeforeServHeaderModify(var ServiceHeader: Record "Service Header", ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

OnBeforeServLineInsert

[IntegrationEvent(False,False)]
local procedure OnBeforeServLineInsert(var ServiceLine: Record "Service Line", ServiceHeader: Record "Service Header", ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServiceLine Table Microsoft.Service.Document."Service Line"
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

OnBeforeUpdateServLedgEntryAmounts

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateServLedgEntryAmounts(var ServiceContractLine: Record "Service Contract Line", var ServLedgEntry: Record "Service Ledger Entry", var InvRoundedAmount: array[4] of Decimal, LineInvoiceFrom: Date, InvoiceTo: Date, var IsHandled: Boolean)

Parameters

Name Type Description
ServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"
ServLedgEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
InvRoundedAmount array[4] of Decimal
LineInvoiceFrom Date
InvoiceTo Date
IsHandled Boolean

OnCalcContractAmountOnAfterServContractLineSetFilters

[IntegrationEvent(False,False)]
local procedure OnCalcContractAmountOnAfterServContractLineSetFilters(var ServiceContractLine: Record "Service Contract Line", var ServiceContractHeader: Record "Service Contract Header", PeriodStarts: Date, PeriodEnds: Date)

Parameters

Name Type Description
ServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
PeriodStarts Date
PeriodEnds Date

OnCreateDetailedServLineOnBeforeServLineInsertFirstLine

[IntegrationEvent(False,False)]
local procedure OnCreateDetailedServLineOnBeforeServLineInsertFirstLine(var ServiceLine: Record "Service Line", var ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServiceLine Table Microsoft.Service.Document."Service Line"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

OnCreateDetailedServLineOnBeforeServLineInsertNewContract

[IntegrationEvent(False,False)]
local procedure OnCreateDetailedServLineOnBeforeServLineInsertNewContract(var ServiceLine: Record "Service Line", var ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServiceLine Table Microsoft.Service.Document."Service Line"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

OnCreateDetailedServLineOnBeforeCreateDescriptionServiceLines

[IntegrationEvent(False,False)]
local procedure OnCreateDetailedServLineOnBeforeCreateDescriptionServiceLines(ServContractHeader: Record "Service Contract Header", var ServContractLine: Record "Service Contract Line", ServHeader: Record "Service Header")

Parameters

Name Type Description
ServContractHeader Table Microsoft.Service.Contract."Service Contract Header"
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"
ServHeader Table Microsoft.Service.Document."Service Header"

OnCreateHeadingServLineOnBeforeServLineInsert

[IntegrationEvent(False,False)]
local procedure OnCreateHeadingServLineOnBeforeServLineInsert(var ServiceLine: Record "Service Line", ServiceContractHeader: Record "Service Contract Header", ServiceHeader: Record "Service Header")

Parameters

Name Type Description
ServiceLine Table Microsoft.Service.Document."Service Line"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
ServiceHeader Table Microsoft.Service.Document."Service Header"

OnCreateOrGetCreditHeaderOnBeforeCalcCurrencyFactor

[IntegrationEvent(False,False)]
local procedure OnCreateOrGetCreditHeaderOnBeforeCalcCurrencyFactor(ServiceHeader: Record "Service Header", var CurrExchRate: Record "Currency Exchange Rate")

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
CurrExchRate Table Microsoft.Finance.Currency."Currency Exchange Rate"

OnCreateOrGetCreditHeaderOnBeforeInitSeries

[IntegrationEvent(False,False)]
local procedure OnCreateOrGetCreditHeaderOnBeforeInitSeries(var ServiceHeader: Record "Service Header", ServMgtSetup: Record "Service Mgt. Setup", var IsHandled: Boolean, ServiceContract: Record "Service Contract Header")

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServMgtSetup Table Microsoft.Service.Setup."Service Mgt. Setup"
IsHandled Boolean
ServiceContract Table Microsoft.Service.Contract."Service Contract Header"

OnCreateServHeaderOnBeforeInitSeries

[IntegrationEvent(False,False)]
local procedure OnCreateServHeaderOnBeforeInitSeries(var ServiceHeader: Record "Service Header", var ServMgtSetup: Record "Service Mgt. Setup", ServContract2: Record "Service Contract Header", var IsHandled: Boolean)

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServMgtSetup Table Microsoft.Service.Setup."Service Mgt. Setup"
ServContract2 Table Microsoft.Service.Contract."Service Contract Header"
IsHandled Boolean

OnCreateServHeaderOnBeforeCalcCurrencyFactor

[IntegrationEvent(False,False)]
local procedure OnCreateServHeaderOnBeforeCalcCurrencyFactor(ServiceHeader: Record "Service Header", var CurrExchRate: Record "Currency Exchange Rate")

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
CurrExchRate Table Microsoft.Finance.Currency."Currency Exchange Rate"

OnBeforeCreateContractLineCreditMemo

[IntegrationEvent(False,False)]
local procedure OnBeforeCreateContractLineCreditMemo(var ServiceContractLine: Record "Service Contract Line", Deleting: Boolean)

Parameters

Name Type Description
ServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"
Deleting Boolean

OnBeforeCreateInvoice

[IntegrationEvent(False,False)]
local procedure OnBeforeCreateInvoice(var ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

OnBeforeCreateRemainingPeriodInvoice

[IntegrationEvent(False,False)]
local procedure OnBeforeCreateRemainingPeriodInvoice(var ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

OnBeforeCreateLastServLines

[IntegrationEvent(False,False)]
local procedure OnBeforeCreateLastServLines(ServiceHeader: Record "Service Header", ContractType: Integer, ContractNo: Code[20], var IsHandled: Boolean)

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ContractType Integer
ContractNo Code[20]
IsHandled Boolean

OnBeforeCalcContractAmount

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcContractAmount(var ServiceContractHeader: Record "Service Contract Header", PeriodStarts: Date, PeriodEnds: Date, var AmountCalculated: Decimal, var IsHandled: Boolean)

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
PeriodStarts Date
PeriodEnds Date
AmountCalculated Decimal
IsHandled Boolean

OnBeforeInsertServiceHeader

[IntegrationEvent(False,False)]
local procedure OnBeforeInsertServiceHeader(var ServiceHeader: Record "Service Header", var ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

OnCreateServiceLedgerEntryOnBeforeServLedgEntryInsert

[IntegrationEvent(False,False)]
local procedure OnCreateServiceLedgerEntryOnBeforeServLedgEntryInsert(var ServiceLedgerEntry: Record "Service Ledger Entry", ServiceContractHeader: Record "Service Contract Header", ServiceContractLine: Record "Service Contract Line")

Parameters

Name Type Description
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
ServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"

OnCreateServiceLedgerEntryBeforeCountLineInvFrom

[IntegrationEvent(False,False)]
local procedure OnCreateServiceLedgerEntryBeforeCountLineInvFrom(var ServLedgEntry: Record "Service Ledger Entry", ServContractLine: Record "Service Contract Line")

Parameters

Name Type Description
ServLedgEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"

OnInsertMultipleServLedgEntriesOnBeforeServLedgEntryInsert

[IntegrationEvent(False,False)]
local procedure OnInsertMultipleServLedgEntriesOnBeforeServLedgEntryInsert(var ServiceLedgerEntry: Record "Service Ledger Entry", ServiceContractHeader: Record "Service Contract Header", ServiceContractLine: Record "Service Contract Line", var NonDistrAmount: array[4] of Decimal, var IsHandled: Boolean, ServiceHeader: Record "Service Header")

Parameters

Name Type Description
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
ServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"
NonDistrAmount array[4] of Decimal
IsHandled Boolean
ServiceHeader Table Microsoft.Service.Document."Service Header"

OnCreateContractLineCreditMemoOnBeforeCalcCreditAmount

[IntegrationEvent(False,False)]
local procedure OnCreateContractLineCreditMemoOnBeforeCalcCreditAmount(var WDate: Date, ServiceContractHeader: Record "Service Contract Header", ServiceContractLine: Record "Service Contract Line")

Parameters

Name Type Description
WDate Date
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
ServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"

OnAfterCreateContractLineCreditMemo

[IntegrationEvent(False,False)]
local procedure OnAfterCreateContractLineCreditMemo(var ServiceContractLine: Record "Service Contract Line", ServiceCreditMemoNo: Code[20])

Parameters

Name Type Description
ServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"
ServiceCreditMemoNo Code[20]

OnAfterFilterServContractLine

[IntegrationEvent(False,False)]
local procedure OnAfterFilterServContractLine(var ServContractLine: Record "Service Contract Line", ContractNo: Code[20], ContractType: Option)

Parameters

Name Type Description
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"
ContractNo Code[20]
ContractType Option

OnAfterFinishCodeunit

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

Parameters

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

OnBeforeCalcServLedgEntryDiscountPct

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

Parameters

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

OnBeforeNoOfMonthsAndMPartsInPeriod

[IntegrationEvent(False,False)]
local procedure OnBeforeNoOfMonthsAndMPartsInPeriod(Day1: Date, Day2: Date, var CheckMParts: Boolean, var MonthsAndMParts: Decimal, var IsHandled: Boolean)

Parameters

Name Type Description
Day1 Date
Day2 Date
CheckMParts Boolean
MonthsAndMParts Decimal
IsHandled Boolean

OnBeforeCopyCheckSCDimToTempSCDim

[IntegrationEvent(False,False)]
local procedure OnBeforeCopyCheckSCDimToTempSCDim(var ServContract: Record "Service Contract Header")

Parameters

Name Type Description
ServContract Table Microsoft.Service.Contract."Service Contract Header"

OnBeforeConfirmCreateServiceInvoiceForPeriod

[IntegrationEvent(False,False)]
local procedure OnBeforeConfirmCreateServiceInvoiceForPeriod(var CurrServContract: Record "Service Contract Header", InvFrom: Date, InvTo: Date, var Result: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
CurrServContract Table Microsoft.Service.Contract."Service Contract Header"
InvFrom Date
InvTo Date
Result Boolean
IsHandled Boolean

OnBeforeCreateRemainingPeriodInvoiceServiceLines

[IntegrationEvent(False,False)]
local procedure OnBeforeCreateRemainingPeriodInvoiceServiceLines(var CurrServContract: Record "Service Contract Header", var ServHeader: Record "Service Header", InvFrom: Date, InvTo: Date, var AppliedEntry: Integer, var IsHandled: Boolean)

Parameters

Name Type Description
CurrServContract Table Microsoft.Service.Contract."Service Contract Header"
ServHeader Table Microsoft.Service.Document."Service Header"
InvFrom Date
InvTo Date
AppliedEntry Integer
IsHandled Boolean

OnBeforePostPartialServLedgEntry

[IntegrationEvent(False,False)]
local procedure OnBeforePostPartialServLedgEntry(var ServLedgEntry: Record "Service Ledger Entry", ServContractLine: Record "Service Contract Line")

Parameters

Name Type Description
ServLedgEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"

OnBeforeServLedgEntryToServiceLine

[IntegrationEvent(False,False)]
local procedure OnBeforeServLedgEntryToServiceLine(var TotalServiceLine: Record "Service Line", var TotalServiceLineLCY: Record "Service Line", ServiceHeader: Record "Service Header", ServiceLedgerEntry: Record "Service Ledger Entry", var IsHandled: Boolean, ServiceLedgerEntryParm: Record "Service Ledger Entry", InvFrom: Date, InvTo: Date)

Parameters

Name Type Description
TotalServiceLine Table Microsoft.Service.Document."Service Line"
TotalServiceLineLCY Table Microsoft.Service.Document."Service Line"
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
IsHandled Boolean
ServiceLedgerEntryParm Table Microsoft.Service.Ledger."Service Ledger Entry"
InvFrom Date
InvTo Date

OnBeforeFindLinePeriodStartsByInvoicedToDate

[IntegrationEvent(False,False)]
local procedure OnBeforeFindLinePeriodStartsByInvoicedToDate(ServContractLine: Record "Service Contract Line", PeriodStarts: Date, var LinePeriodStarts: Date, var IsHandled: Boolean)

Parameters

Name Type Description
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"
PeriodStarts Date
LinePeriodStarts Date
IsHandled Boolean

OnInsertDescriptionServiceLineOnBeforeServiceLineInsert

[IntegrationEvent(False,False)]
local procedure OnInsertDescriptionServiceLineOnBeforeServiceLineInsert(var ServiceLine: Record "Service Line")

Parameters

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

OnServLedgEntryToServiceLineOnBeforeServLineInsert

[IntegrationEvent(False,False)]
local procedure OnServLedgEntryToServiceLineOnBeforeServLineInsert(var ServiceLine: Record "Service Line", TotalServiceLine: Record "Service Line", TotalServiceLineLCY: Record "Service Line", ServiceHeader: Record "Service Header", ServiceLedgerEntry: Record "Service Ledger Entry", ServiceLedgerEntryParm: Record "Service Ledger Entry", var IsHandled: Boolean, InvFrom: Date, InvTo: Date)

Parameters

Name Type Description
ServiceLine Table Microsoft.Service.Document."Service Line"
TotalServiceLine Table Microsoft.Service.Document."Service Line"
TotalServiceLineLCY Table Microsoft.Service.Document."Service Line"
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServiceLedgerEntryParm Table Microsoft.Service.Ledger."Service Ledger Entry"
IsHandled Boolean
InvFrom Date
InvTo Date

OnCreateContractLineCreditMemoOnAfterCreateAllCreditLines

[IntegrationEvent(False,False)]
local procedure OnCreateContractLineCreditMemoOnAfterCreateAllCreditLines(ServContractHeader: Record "Service Contract Header", ServiceContractLine: Record "Service Contract Line", CreditMemoNo: Code[20])

Parameters

Name Type Description
ServContractHeader Table Microsoft.Service.Contract."Service Contract Header"
ServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"
CreditMemoNo Code[20]

OnAfterCreateOrGetCreditHeader

[IntegrationEvent(False,False)]
local procedure OnAfterCreateOrGetCreditHeader(var ServiceHeader: Record "Service Header", ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

OnCreateRemainingPeriodInvoiceOnAfterServContractLineSetFilters

[IntegrationEvent(False,False)]
local procedure OnCreateRemainingPeriodInvoiceOnAfterServContractLineSetFilters(var ServiceContractLine: Record "Service Contract Line", ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

OnCreateAllServLinesOnAfterServContractLineSetFilters

[IntegrationEvent(False,False)]
local procedure OnCreateAllServLinesOnAfterServContractLineSetFilters(var ServiceContractLine: Record "Service Contract Line", ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

OnCreateAllServLinesOnAfterCreateDetailedServLine

[IntegrationEvent(False,False)]
local procedure OnCreateAllServLinesOnAfterCreateDetailedServLine(ServiceContractHeader: Record "Service Contract Header", ServHeader: Record "Service Header", ServContractLine: Record "Service Contract Line")

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
ServHeader Table Microsoft.Service.Document."Service Header"
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"

OnCreateAllServLinesOnAfterCalcShouldCraeteServiceApplyEntry

[IntegrationEvent(False,False)]
local procedure OnCreateAllServLinesOnAfterCalcShouldCraeteServiceApplyEntry(var ServHeader: Record "Service Header", ServContractToInvoice: Record "Service Contract Header", var ServContractLine: Record "Service Contract Line", var PartInvoiceFrom: Date, var PartInvoiceTo: Date, var ServiceApplyEntry: Integer, var ShouldCraeteServiceApplyEntry: Boolean)

Parameters

Name Type Description
ServHeader Table Microsoft.Service.Document."Service Header"
ServContractToInvoice Table Microsoft.Service.Contract."Service Contract Header"
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"
PartInvoiceFrom Date
PartInvoiceTo Date
ServiceApplyEntry Integer
ShouldCraeteServiceApplyEntry Boolean

OnCreateAllServLinesOnBeforeCreateLastServiceLines

[IntegrationEvent(False,False)]
local procedure OnCreateAllServLinesOnBeforeCreateLastServiceLines(var ServContractToInvoice: Record "Service Contract Header", var ServLine: Record "Service Line")

Parameters

Name Type Description
ServContractToInvoice Table Microsoft.Service.Contract."Service Contract Header"
ServLine Table Microsoft.Service.Document."Service Line"

OnCreateAllServLinesOnBeforeServContractLineLoop

[IntegrationEvent(False,False)]
local procedure OnCreateAllServLinesOnBeforeServContractLineLoop(var InvoiceFrom: Date, ServContractLine: Record "Service Contract Line", ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
InvoiceFrom Date
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

OnCreateAllCreditLinesCaseElse

[IntegrationEvent(False,False)]
local procedure OnCreateAllCreditLinesCaseElse(ServiceContractHeader: Record "Service Contract Header", var InvPeriod: Integer)

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
InvPeriod Integer

OnCreateAllCreditLinesOnAfterDetermineOldWDate

[IntegrationEvent(False,False)]
local procedure OnCreateAllCreditLinesOnAfterDetermineOldWDate(ServiceContractHeader: Record "Service Contract Header", InvPeriod: Integer, Days: Integer, WDate: Date, var OldWDate: Date)

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
InvPeriod Integer
Days Integer
WDate Date
OldWDate Date

OnCreateDetailedServLineOnAfterSetFirstLineAndNewContract

[IntegrationEvent(False,False)]
local procedure OnCreateDetailedServLineOnAfterSetFirstLineAndNewContract(var FirstLine: Boolean, var NewContract: Boolean, ServContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
FirstLine Boolean
NewContract Boolean
ServContractHeader Table Microsoft.Service.Contract."Service Contract Header"

OnCreateInvoiceOnBeforeCreateAllServLines

[IntegrationEvent(False,False)]
local procedure OnCreateInvoiceOnBeforeCreateAllServLines(var ServiceContractHeader: Record "Service Contract Header", InvoiceFromDate: Date, InvoiceToDate: Date, var InvoicedAmount: Decimal, var PostingDate: Date, InvoicingStartingPeriod: Boolean, InvNo: Code[20])

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
InvoiceFromDate Date
InvoiceToDate Date
InvoicedAmount Decimal
PostingDate Date
InvoicingStartingPeriod Boolean
InvNo Code[20]

OnLookupServItemNoOnBeforeFilterByCustomerNo

[IntegrationEvent(False,False)]
local procedure OnLookupServItemNoOnBeforeFilterByCustomerNo(var ServItem: Record "Service Item", var ServiceContractLine: Record "Service Contract Line", var IsHandled: Boolean)

Parameters

Name Type Description
ServItem Table Microsoft.Service.Item."Service Item"
ServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"
IsHandled Boolean

OnLookupServItemNoOnAfterServItemSetFilters

[IntegrationEvent(False,False)]
local procedure OnLookupServItemNoOnAfterServItemSetFilters(var ServiceItem: Record "Service Item", ServiceContractLine: Record "Service Contract Line")

Parameters

Name Type Description
ServiceItem Table Microsoft.Service.Item."Service Item"
ServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"

OnPostPartialServLedgEntryOnBeforeServLedgEntryInsert

[IntegrationEvent(False,False)]
local procedure OnPostPartialServLedgEntryOnBeforeServLedgEntryInsert(var ServLedgEntry: Record "Service Ledger Entry", ServContractLine: Record "Service Contract Line", ServiceHeader: Record "Service Header")

Parameters

Name Type Description
ServLedgEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"
ServiceHeader Table Microsoft.Service.Document."Service Header"

OnAfterCreateRemainingPeriodInvoice

[IntegrationEvent(False,False)]
local procedure OnAfterCreateRemainingPeriodInvoice(var CurrServContract: Record "Service Contract Header")

Parameters

Name Type Description
CurrServContract Table Microsoft.Service.Contract."Service Contract Header"

OnBeforeSetSalespersonCode

[IntegrationEvent(False,False)]
local procedure OnBeforeSetSalespersonCode(SalesPersonCodeToCheck: Code[20], var SalesPersonCodeToAssign: Code[20], var IsHandled: Boolean)

Parameters

Name Type Description
SalesPersonCodeToCheck Code[20]
SalesPersonCodeToAssign Code[20]
IsHandled Boolean

OnBeforeUpdateApplyUntilEntryNoInServLedgEntry

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateApplyUntilEntryNoInServLedgEntry(ServContractHeader: Record "Service Contract Header", SigningContract: Boolean, ReturnLedgerEntry: Integer, FirstLineEntry: Integer, LastEntry: Integer, var IsHandled: Boolean)

Parameters

Name Type Description
ServContractHeader Table Microsoft.Service.Contract."Service Contract Header"
SigningContract Boolean
ReturnLedgerEntry Integer
FirstLineEntry Integer
LastEntry Integer
IsHandled Boolean

OnCreateServiceLedgerEntryOnAfterInitServLedgEntry

[IntegrationEvent(False,False)]
local procedure OnCreateServiceLedgerEntryOnAfterInitServLedgEntry(var ServLedgEntry: Record "Service Ledger Entry", var ServContractHeader: Record "Service Contract Header", ContractType: Integer, ContractNo: Code[20], LineNo: Integer)

Parameters

Name Type Description
ServLedgEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServContractHeader Table Microsoft.Service.Contract."Service Contract Header"
ContractType Integer
ContractNo Code[20]
LineNo Integer

OnCreateServiceLedgEntryOnPrepaidOnAfterServContractLineSetFilters

[IntegrationEvent(False,False)]
local procedure OnCreateServiceLedgEntryOnPrepaidOnAfterServContractLineSetFilters(var ServContractLine: Record "Service Contract Line", AddingNewLines: Boolean)

Parameters

Name Type Description
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"
AddingNewLines Boolean

OnCreateServiceLedgEntryOnNotPrepaidOnAfterServContractLineSetFilters

[IntegrationEvent(False,False)]
local procedure OnCreateServiceLedgEntryOnNotPrepaidOnAfterServContractLineSetFilters(var ServContractLine: Record "Service Contract Line", ServContractHeader: Record "Service Contract Header", AddingNewLines: Boolean)

Parameters

Name Type Description
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"
ServContractHeader Table Microsoft.Service.Contract."Service Contract Header"
AddingNewLines Boolean

OnCreateServiceLedgEntryOnPrepaidOnBeforeCalcInvAmounts

[IntegrationEvent(False,False)]
local procedure OnCreateServiceLedgEntryOnPrepaidOnBeforeCalcInvAmounts(var ServContractLine: Record "Service Contract Line", var ServLedgEntry: Record "Service Ledger Entry")

Parameters

Name Type Description
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"
ServLedgEntry Table Microsoft.Service.Ledger."Service Ledger Entry"

OnCreateServiceLedgEntryOnAfterWDateLoop

[IntegrationEvent(False,False)]
local procedure OnCreateServiceLedgEntryOnAfterWDateLoop(var ServContractHeader: Record "Service Contract Header", var WDate: Date)

Parameters

Name Type Description
ServContractHeader Table Microsoft.Service.Contract."Service Contract Header"
WDate Date

OnCreateServiceLedgerEntryOnBeforeCheckServContractLineStartingDate

[IntegrationEvent(False,False)]
local procedure OnCreateServiceLedgerEntryOnBeforeCheckServContractLineStartingDate(ServContractHeader: Record "Service Contract Header", var CountOfEntryLoop: Integer)

Parameters

Name Type Description
ServContractHeader Table Microsoft.Service.Contract."Service Contract Header"
CountOfEntryLoop Integer

OnCreateServiceLedgerEntryOnBeforeLoopPeriods

[IntegrationEvent(False,False)]
local procedure OnCreateServiceLedgerEntryOnBeforeLoopPeriods(ServContractHeader: Record "Service Contract Header", ServContractLine: Record "Service Contract Line", var InvFrom: Date, var WDate: Date, var DateExpression: Text)

Parameters

Name Type Description
ServContractHeader Table Microsoft.Service.Contract."Service Contract Header"
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"
InvFrom Date
WDate Date
DateExpression Text

OnCreateServiceLedgerEntryOnBeforeInsertMultipleServLedgEntries

[IntegrationEvent(False,False)]
local procedure OnCreateServiceLedgerEntryOnBeforeInsertMultipleServLedgEntries(var NextInvDate: Date, ServContractHeader: Record "Service Contract Header", ServContractLine: Record "Service Contract Line", var NoOfPayments: Integer, var DueDate: Date, var InvFromDate: Date, var AddingNewLines: Boolean, var CountOfEntryLoop: Integer)

Parameters

Name Type Description
NextInvDate Date
ServContractHeader Table Microsoft.Service.Contract."Service Contract Header"
ServContractLine Table Microsoft.Service.Contract."Service Contract Line"
NoOfPayments Integer
DueDate Date
InvFromDate Date
AddingNewLines Boolean
CountOfEntryLoop Integer

OnCreateDescriptionServiceLinesOnAfterCalcServLineDescription

[IntegrationEvent(False,False)]
local procedure OnCreateDescriptionServiceLinesOnAfterCalcServLineDescription(var ServLineDescription: Text, var ServContractLineItemNo: Code[20], var ServContractLineDesc: Text[100], var ServContractLineItemSerialNo: Code[50])

Parameters

Name Type Description
ServLineDescription Text
ServContractLineItemNo Code[20]
ServContractLineDesc Text[100]
ServContractLineItemSerialNo Code[50]

OnGetInvoicePeriodTextOnCaseElse

[IntegrationEvent(False,False)]
local procedure OnGetInvoicePeriodTextOnCaseElse(InvoicePeriod: Enum "Service Contract Header Invoice Period", var InvPeriodText: Text[4])

Parameters

Name Type Description
InvoicePeriod Enum Microsoft.Service.Contract."Service Contract Header Invoice Period"
InvPeriodText Text[4]

OnCreateServHeaderOnAfterCopyFromCustomer

[IntegrationEvent(False,False)]
local procedure OnCreateServHeaderOnAfterCopyFromCustomer(var ServiceHeader: Record "Service Header", ServiceContract: Record "Service Contract Header", Customer: Record Customer)

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceContract Table Microsoft.Service.Contract."Service Contract Header"
Customer Table Microsoft.Sales.Customer.Customer

OnGetAffectedItemsOnContractChangeOnAfterServContractLineSetFilters

[IntegrationEvent(False,False)]
local procedure OnGetAffectedItemsOnContractChangeOnAfterServContractLineSetFilters(var ServiceContractLine: Record "Service Contract Line")

Parameters

Name Type Description
ServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"

OnGetAffectedItemsOnContractChangeOnAfterTempServItemGetOrInsert

[IntegrationEvent(False,False)]
local procedure OnGetAffectedItemsOnContractChangeOnAfterTempServItemGetOrInsert(var IsHandled: Boolean, var ServiceContractLine: Record "Service Contract Line", var TempServiceContractHeader: Record "Service Contract Header", var TempServiceItem: Record "Service Item")

Parameters

Name Type Description
IsHandled Boolean
ServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"
TempServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
TempServiceItem Table Microsoft.Service.Item."Service Item"

OnChangeCustNoOnServContractOnAfterGetCust

Obsolete

This element will become obsolete from version 25.0. Replaced by event OnChangeCustNoOnServContractOnAfterGetCustomer

[Obsolete(Replaced by event OnChangeCustNoOnServContractOnAfterGetCustomer,25.0)]
[IntegrationEvent(False,False)]
local procedure OnChangeCustNoOnServContractOnAfterGetCust(Customer: Record Customer, var ServiceContractHeader: Record "Service Contract Header", var CustCheckCrLimit: Codeunit "Cust-Check Cr. Limit", var IsHandled: Boolean)

Parameters

Name Type Description
Customer Table Microsoft.Sales.Customer.Customer
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
CustCheckCrLimit Codeunit Microsoft.Sales.Customer."Cust-Check Cr. Limit"
IsHandled Boolean

OnChangeCustNoOnServContractOnAfterGetCustomer

[IntegrationEvent(False,False)]
local procedure OnChangeCustNoOnServContractOnAfterGetCustomer(Customer: Record Customer, var ServiceContractHeader: Record "Service Contract Header", var ServCheckCreditLimit: Codeunit "Serv. Check Credit Limit", var IsHandled: Boolean)

Parameters

Name Type Description
Customer Table Microsoft.Sales.Customer.Customer
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
ServCheckCreditLimit Codeunit Microsoft.Sales.Customer."Serv. Check Credit Limit"
IsHandled Boolean

OnAfterChangeCustNoOnServItem

[IntegrationEvent(False,False)]
local procedure OnAfterChangeCustNoOnServItem(var ServiceItem: Record "Service Item")

Parameters

Name Type Description
ServiceItem Table Microsoft.Service.Item."Service Item"

OnCreateServHeaderOnBeforeCheckBlockedCustOnDocs

[IntegrationEvent(False,False)]
local procedure OnCreateServHeaderOnBeforeCheckBlockedCustOnDocs(var ServiceHeader: Record "Service Header", ServiceContractHeader: Record "Service Contract Header", var IsHandled: Boolean)

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
IsHandled Boolean

OnBeforeCheckDimValuePosting

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckDimValuePosting(ServiceContractHeader: Record "Service Contract Header", LineNo: Integer, var IsHandled: Boolean)

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
LineNo Integer
IsHandled Boolean

OnBeforeCheckMultipleCurrenciesForCustomers

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckMultipleCurrenciesForCustomers(var ServiceContractHeader: Record "Service Contract Header", var IsHandled: Boolean)

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
IsHandled Boolean

OnCreateCreditLineOnBeforeServLineHeadingInsert

[IntegrationEvent(False,False)]
local procedure OnCreateCreditLineOnBeforeServLineHeadingInsert(var ServiceLine: Record "Service Line", ServiceHeader: Record "Service Header", ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServiceLine Table Microsoft.Service.Document."Service Line"
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

OnCreateOrGetCreditHeaderOnBeforeCheckBlockedCustOnDocs

[IntegrationEvent(False,False)]
local procedure OnCreateOrGetCreditHeaderOnBeforeCheckBlockedCustOnDocs(var ServiceHeader: Record "Service Header", ServiceContractHeader: Record "Service Contract Header", var IsHandled: Boolean)

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
IsHandled Boolean

OnAfterInitServLedgEntry

[IntegrationEvent(False,False)]
local procedure OnAfterInitServLedgEntry(var ServiceLedgerEntry: Record "Service Ledger Entry", ServiceContractHeader: Record "Service Contract Header")

Parameters

Name Type Description
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"

OnCreateServiceLedgEntryOnBeforeCalcCurrencyAmountRoundingPrecision

[IntegrationEvent(False,False)]
local procedure OnCreateServiceLedgEntryOnBeforeCalcCurrencyAmountRoundingPrecision(ServiceContractHeader: Record "Service Contract Header", var ServiceLedgerEntry: Record "Service Ledger Entry", var InvRoundedAmount: array[4] of Decimal, var InvAmount: array[4] of Decimal, AmountType: Option, Currency: Record Currency, ServiceHeader2: Record "Service Header", var IsHandled: Boolean)

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
InvRoundedAmount array[4] of Decimal
InvAmount array[4] of Decimal
AmountType Option
Currency Table Microsoft.Finance.Currency.Currency
ServiceHeader2 Table Microsoft.Service.Document."Service Header"
IsHandled Boolean

OnCreateServiceLedgEntryOnAfterSetDiscountAmount

[IntegrationEvent(False,False)]
local procedure OnCreateServiceLedgEntryOnAfterSetDiscountAmount(ServiceContractHeader: Record "Service Contract Header", var ServiceLedgerEntry: Record "Service Ledger Entry", var InvRoundedAmount: array[4] of Decimal, var InvAmount: array[4] of Decimal, AmountType: Option, Currency: Record Currency, ServiceHeader2: Record "Service Header")

Parameters

Name Type Description
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
InvRoundedAmount array[4] of Decimal
InvAmount array[4] of Decimal
AmountType Option
Currency Table Microsoft.Finance.Currency.Currency
ServiceHeader2 Table Microsoft.Service.Document."Service Header"

OnCreateCreditLineOnBeforeCreateDim

[IntegrationEvent(False,False)]
local procedure OnCreateCreditLineOnBeforeCreateDim(var ServiceLine2: Record "Service Line", var IsHandled: Boolean)

Parameters

Name Type Description
ServiceLine2 Table Microsoft.Service.Document."Service Line"
IsHandled Boolean

OnCreateAllServLinesOnAfterCreateServiceLine

[IntegrationEvent(False,False)]
local procedure OnCreateAllServLinesOnAfterCreateServiceLine(var ServiceContractLine: Record "Service Contract Line", ServiceHeader: Record "Service Header", InvoiceFrom: Date, InvoiceTo: Date)

Parameters

Name Type Description
ServiceContractLine Table Microsoft.Service.Contract."Service Contract Line"
ServiceHeader Table Microsoft.Service.Document."Service Header"
InvoiceFrom Date
InvoiceTo Date

OnGetAffectedItemsOnContractChangeOnBeforeOnFindServContractLine2

[IntegrationEvent(False,False)]
local procedure OnGetAffectedItemsOnContractChangeOnBeforeOnFindServContractLine2(var ServiceContractLine2: Record "Service Contract Line")

Parameters

Name Type Description
ServiceContractLine2 Table Microsoft.Service.Contract."Service Contract Line"

OnServLedgEntryToServiceLineOnBeforeDimSet

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

Parameters

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

OnCreateOrGetCreditHeaderOnAfterCopyFromCustomer

[IntegrationEvent(False,False)]
local procedure OnCreateOrGetCreditHeaderOnAfterCopyFromCustomer(var ServiceHeader: Record "Service Header", ServiceContract: Record "Service Contract Header", Customer: Record Customer)

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceContract Table Microsoft.Service.Contract."Service Contract Header"
Customer Table Microsoft.Sales.Customer.Customer

OnBeforeCheckCustomer

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckCustomer(var Result: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
Result Boolean
IsHandled Boolean

OnAfterInitCodeUnit

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

Parameters

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

OnFillTempServiceLedgerEntriesOAfterCalcDoInsertTempServiceLedgerEntry

[IntegrationEvent(False,False)]
local procedure OnFillTempServiceLedgerEntriesOAfterCalcDoInsertTempServiceLedgerEntry(ServiceLedgerEntry: Record "Service Ledger Entry", var DoInsertTempServiceLedgerEntry: Boolean)

Parameters

Name Type Description
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
DoInsertTempServiceLedgerEntry Boolean

OnInsertMultipleServLedgEntriesOnUpdateDateFieldsBeforeCalcNonDistrAmount

[IntegrationEvent(False,False)]
local procedure OnInsertMultipleServLedgEntriesOnUpdateDateFieldsBeforeCalcNonDistrAmount(var InvoiceFrom: Date, var DueDate: Date, NoOfPayments: Integer)

Parameters

Name Type Description
InvoiceFrom Date
DueDate Date
NoOfPayments Integer

OnInsertMultipleServLedgEntriesOnBeforeUpdatePaymentsCount

[IntegrationEvent(False,False)]
local procedure OnInsertMultipleServLedgEntriesOnBeforeUpdatePaymentsCount(CheckMonthParts: Boolean, var NoOfPayments: Integer, var CountOfEntryLoop: Integer, var ShouldUpdatePaymentsCount: Boolean)

Parameters

Name Type Description
CheckMonthParts Boolean
NoOfPayments Integer
CountOfEntryLoop Integer
ShouldUpdatePaymentsCount Boolean

OnInsertMultipleServLedgEntriesOnBeforeSetServLedgEntryAmounts

[IntegrationEvent(False,False)]
local procedure OnInsertMultipleServLedgEntriesOnBeforeSetServLedgEntryAmounts(var ServiceLedgerEntry: Record "Service Ledger Entry", var InvRoundedAmount: array[4] of Decimal, NonDistrAmount: array[4] of Decimal, NoOfPayments: Integer, Index: Integer, CountOfEntryLoop: Integer, AmountRoundingPrecision: Decimal, DueDate: Date, var IsHandled: Boolean)

Parameters

Name Type Description
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
InvRoundedAmount array[4] of Decimal
NonDistrAmount array[4] of Decimal
NoOfPayments Integer
Index Integer
CountOfEntryLoop Integer
AmountRoundingPrecision Decimal
DueDate Date
IsHandled Boolean

OnInsertMultipleServLedgEntriesOnAfterSetDueDate

[IntegrationEvent(False,False)]
local procedure OnInsertMultipleServLedgEntriesOnAfterSetDueDate(Index: Integer, var DueDate: Date, ServiceLedgerEntry: Record "Service Ledger Entry", CountOfEntryLoop: Integer, InvRoundedAmount: array[4] of Decimal, var NonDistrAmount: array[4] of Decimal, var ServiceHeader: Record "Service Header", AmountRoundingPrecision: Decimal)

Parameters

Name Type Description
Index Integer
DueDate Date
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
CountOfEntryLoop Integer
InvRoundedAmount array[4] of Decimal
NonDistrAmount array[4] of Decimal
ServiceHeader Table Microsoft.Service.Document."Service Header"
AmountRoundingPrecision Decimal

OnCreateServiceLineOnBeforeServLedgEntryToServiceLine

[IntegrationEvent(False,False)]
local procedure OnCreateServiceLineOnBeforeServLedgEntryToServiceLine(var ServiceHeader: Record "Service Header", var ServiceContractHeader: Record "Service Contract Header", var ServiceLedgerEntry: Record "Service Ledger Entry", var InvFromDate: Date, var InvToDate: Date)

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceContractHeader Table Microsoft.Service.Contract."Service Contract Header"
ServiceLedgerEntry Table Microsoft.Service.Ledger."Service Ledger Entry"
InvFromDate Date
InvToDate Date

OnCreateServiceLineOnAfterServLedgEntryToServiceLine

[IntegrationEvent(False,False)]
local procedure OnCreateServiceLineOnAfterServLedgEntryToServiceLine(ServiceHeader: Record "Service Header", InvoiceFromDate: Date, InvoiceToDate: Date)

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
InvoiceFromDate Date
InvoiceToDate Date

See also