Codeunit ServOrderManagement

ID 5900
Namespace: Microsoft.Service.Document

Methods

ServHeaderLookup

procedure ServHeaderLookup(DocumentType: Integer, var DocumentNo: Code[20]): Boolean

Parameters

Name Type Description
DocumentType Integer
DocumentNo Code[20]

Returns

Type Description
Boolean

UpdateResponseDateTime

procedure UpdateResponseDateTime(var ServItemLine: Record "Service Item Line", Deleting: Boolean)

Parameters

Name Type Description
ServItemLine Table Microsoft.Service.Document."Service Item Line"
Deleting Boolean

CreateNewCustomer

procedure CreateNewCustomer(var ServHeader: Record "Service Header")

Parameters

Name Type Description
ServHeader Table Microsoft.Service.Document."Service Header"

ReplacementCreateServItem

procedure ReplacementCreateServItem(FromServItem: Record "Service Item", ServiceLine: Record "Service Line", ServShptDocNo: Code[20], ServShptLineNo: Integer, var TempTrackingSpecification: Record "Tracking Specification" temporary)

Parameters

Name Type Description
FromServItem Table Microsoft.Service.Item."Service Item"
ServiceLine Table Microsoft.Service.Document."Service Line"
ServShptDocNo Code[20]
ServShptLineNo Integer
TempTrackingSpecification Table Microsoft.Inventory.Tracking."Tracking Specification"

InsertServCost

procedure InsertServCost(ServInvLine: Record "Service Line", CostType: Integer, LinktoServItemLine: Boolean): Boolean

Parameters

Name Type Description
ServInvLine Table Microsoft.Service.Document."Service Line"
CostType Integer
LinktoServItemLine Boolean

Returns

Type Description
Boolean

FindContactInformation

procedure FindContactInformation(CustNo: Code[20]): Code[20]

Parameters

Name Type Description
CustNo Code[20]

Returns

Type Description
Code[20]

FindResLocationCode

procedure FindResLocationCode(ResourceNo: Code[20], StartDate: Date): Code[10]

Parameters

Name Type Description
ResourceNo Code[20]
StartDate Date

Returns

Type Description
Code[10]

CalcServTime

procedure CalcServTime(StartingDate: Date, StartingTime: Time, FinishingDate: Date, FinishingTime: Time, ContractNo: Code[20], ContractCalendarExists: Boolean): Decimal

Parameters

Name Type Description
StartingDate Date
StartingTime Time
FinishingDate Date
FinishingTime Time
ContractNo Code[20]
ContractCalendarExists Boolean

Returns

Type Description
Decimal

LookupServItemNo

procedure LookupServItemNo(var ServItemLine: Record "Service Item Line")

Parameters

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

UpdatePriority

procedure UpdatePriority(var ServItemLine: Record "Service Item Line", Deleting: Boolean)

Parameters

Name Type Description
ServItemLine Table Microsoft.Service.Document."Service Item Line"
Deleting Boolean

InServiceContract

procedure InServiceContract(var ServInvLine: Record "Service Line"): Boolean

Parameters

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

Returns

Type Description
Boolean

CheckServItemRepairStatus

procedure CheckServItemRepairStatus(ServHeader: Record "Service Header", var ServItemLine: Record "Service Item Line" temporary, var ServLine: Record "Service Line")

Parameters

Name Type Description
ServHeader Table Microsoft.Service.Document."Service Header"
ServItemLine Table Microsoft.Service.Document."Service Item Line"
ServLine Table Microsoft.Service.Document."Service Line"

CopyCommentLines

procedure CopyCommentLines(FromDocumentType: Integer, ToDocumentType: Integer, FromNo: Code[20], ToNo: Code[20])

Parameters

Name Type Description
FromDocumentType Integer
ToDocumentType Integer
FromNo Code[20]
ToNo Code[20]

CopyCommentLinesWithSubType

procedure CopyCommentLinesWithSubType(FromDocumentType: Integer, ToDocumentType: Integer, FromNo: Code[20], ToNo: Code[20], FromTableSubType: Integer)

Parameters

Name Type Description
FromDocumentType Integer
ToDocumentType Integer
FromNo Code[20]
ToNo Code[20]
FromTableSubType Integer

CalcContractDates

procedure CalcContractDates(var ServHeader: Record "Service Header", var ServItemLine: Record "Service Item Line")

Parameters

Name Type Description
ServHeader Table Microsoft.Service.Document."Service Header"
ServItemLine Table Microsoft.Service.Document."Service Item Line"

CalcServItemDates

procedure CalcServItemDates(var ServHeader: Record "Service Header", ServItemNo: Code[20])

Parameters

Name Type Description
ServHeader Table Microsoft.Service.Document."Service Header"
ServItemNo Code[20]

Events

OnBeforeCalcContractDates

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcContractDates(var ServiceHeader: Record "Service Header", var ServiceItemLine: Record "Service Item Line", var IsHandled: Boolean)

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceItemLine Table Microsoft.Service.Document."Service Item Line"
IsHandled Boolean

OnBeforeCalcServItemDates

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcServItemDates(var ServiceHeader: Record "Service Header", ServItemNo: Code[20], var IsHandled: Boolean)

Parameters

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

OnBeforeToCustInvDiscInsert

[IntegrationEvent(False,False)]
local procedure OnBeforeToCustInvDiscInsert(var ToCustInvoiceDisc: Record "Cust. Invoice Disc.", FromCustInvoiceDisc: Record "Cust. Invoice Disc.")

Parameters

Name Type Description
ToCustInvoiceDisc Table Microsoft.Sales.Pricing."Cust. Invoice Disc."
FromCustInvoiceDisc Table Microsoft.Sales.Pricing."Cust. Invoice Disc."

OnBeforeUpdateResponseDateTime

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateResponseDateTime(var ServItemLine: Record "Service Item Line", var Deleting: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
ServItemLine Table Microsoft.Service.Document."Service Item Line"
Deleting Boolean
IsHandled Boolean

OnLookupServItemNoOnAfterServItemSetFilters

[IntegrationEvent(False,False)]
local procedure OnLookupServItemNoOnAfterServItemSetFilters(var ServItemLine: Record "Service Item Line", var ServItem: Record "Service Item", ServHeader: Record "Service Header")

Parameters

Name Type Description
ServItemLine Table Microsoft.Service.Document."Service Item Line"
ServItem Table Microsoft.Service.Item."Service Item"
ServHeader Table Microsoft.Service.Document."Service Header"

OnLookupServItemNoOnBeforeServItemReset

[IntegrationEvent(False,False)]
local procedure OnLookupServItemNoOnBeforeServItemReset(var ServiceItemLine: Record "Service Item Line", var ServiceItem: Record "Service Item", ServiceHeader: Record "Service Header")

Parameters

Name Type Description
ServiceItemLine Table Microsoft.Service.Document."Service Item Line"
ServiceItem Table Microsoft.Service.Item."Service Item"
ServiceHeader Table Microsoft.Service.Document."Service Header"

OnReplacementCreateServItemAfterNewServItemFilterSet

[IntegrationEvent(False,False)]
local procedure OnReplacementCreateServItemAfterNewServItemFilterSet(var IsHandled: Boolean, var NewServItem: Record "Service Item")

Parameters

Name Type Description
IsHandled Boolean
NewServItem Table Microsoft.Service.Item."Service Item"

OnReplacementCreateServItemAfterSerialNoCheck

[IntegrationEvent(False,False)]
local procedure OnReplacementCreateServItemAfterSerialNoCheck(var NewServItem: Record "Service Item", FromServItem: Record "Service Item", SerialNo: Code[50], ServiceLine: Record "Service Line", ServShptDocNo: Code[20], ServShptLineNo: Integer, var IsHandled: Boolean)

Parameters

Name Type Description
NewServItem Table Microsoft.Service.Item."Service Item"
FromServItem Table Microsoft.Service.Item."Service Item"
SerialNo Code[50]
ServiceLine Table Microsoft.Service.Document."Service Line"
ServShptDocNo Code[20]
ServShptLineNo Integer
IsHandled Boolean

OnReplacementCreateServItemOnBeforeServItemAutoCreated

[IntegrationEvent(False,False)]
local procedure OnReplacementCreateServItemOnBeforeServItemAutoCreated(var FromServItem: Record "Service Item", NewServItem: Record "Service Item", ServiceLine: Record "Service Line", var IsHandled: Boolean)

Parameters

Name Type Description
FromServItem Table Microsoft.Service.Item."Service Item"
NewServItem Table Microsoft.Service.Item."Service Item"
ServiceLine Table Microsoft.Service.Document."Service Line"
IsHandled Boolean

OnAfterReplacementCreateServItem

[IntegrationEvent(False,False)]
local procedure OnAfterReplacementCreateServItem(NewServItem: Record "Service Item", FromServItem: Record "Service Item", var IsHandled: Boolean)

Parameters

Name Type Description
NewServItem Table Microsoft.Service.Item."Service Item"
FromServItem Table Microsoft.Service.Item."Service Item"
IsHandled Boolean

OnAfterCopyCustFromServiceHeader

[IntegrationEvent(False,False)]
local procedure OnAfterCopyCustFromServiceHeader(var Cust: Record Customer, ServiceHeader: Record "Service Header")

Parameters

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

OnInsertServCostOnCostTypeOneOnAfterServCostGet

[IntegrationEvent(False,False)]
local procedure OnInsertServCostOnCostTypeOneOnAfterServCostGet(var ServHeader: Record "Service Header", var ServCost: Record "Service Cost")

Parameters

Name Type Description
ServHeader Table Microsoft.Service.Document."Service Header"
ServCost Table Microsoft.Service.Pricing."Service Cost"

OnUpdateResponseDateTimeOnBeforeNewResponseDate

[IntegrationEvent(False,False)]
local procedure OnUpdateResponseDateTimeOnBeforeNewResponseDate(var ServiceItemLine: Record "Service Item Line", var IsHandled: Boolean)

Parameters

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

OnBeforeLookupServItemNo

[IntegrationEvent(False,False)]
local procedure OnBeforeLookupServItemNo(var ServiceItemLine: Record "Service Item Line", var IsHandled: Boolean)

Parameters

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

OnCopyCommentLinesWithSubTypeOnBeforeServCommentLineInsert

[IntegrationEvent(False,False)]
local procedure OnCopyCommentLinesWithSubTypeOnBeforeServCommentLineInsert(var ServiceCommentLine2: Record "Service Comment Line", var IsHandled: Boolean)

Parameters

Name Type Description
ServiceCommentLine2 Table Microsoft.Service.Comment."Service Comment Line"
IsHandled Boolean

OnBeforeCopyComponentsFromBOM

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

Parameters

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

OnCreateCustFromTemplateOnBeforeCustInsert

[IntegrationEvent(False,False)]
local procedure OnCreateCustFromTemplateOnBeforeCustInsert(var Customer: Record Customer, CustomerTempl: Record "Customer Templ.", ServiceHeader: Record "Service Header")

Parameters

Name Type Description
Customer Table Microsoft.Sales.Customer.Customer
CustomerTempl Table Microsoft.Sales.Customer."Customer Templ."
ServiceHeader Table Microsoft.Service.Document."Service Header"

OnBeforeCheckItemServiceBlocked

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckItemServiceBlocked(var ServiceItemLine: Record "Service Item Line", var IsHandled: Boolean)

Parameters

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

See also