Codeunit ServItemManagement

ID 5920
Namespace: Microsoft.Service.Item

Methods

AddOrReplaceSIComponent

procedure AddOrReplaceSIComponent(var ServLine: Record "Service Line", ServHeader: Record "Service Header", ServShptDocNo: Code[20], ServShptLineNo: Integer, var TempTrackingSpecification: Record "Tracking Specification" temporary)

Parameters

Name Type Description
ServLine Table Microsoft.Service.Document."Service Line"
ServHeader Table Microsoft.Service.Document."Service Header"
ServShptDocNo Code[20]
ServShptLineNo Integer
TempTrackingSpecification Table Microsoft.Inventory.Tracking."Tracking Specification"

InsertServiceItemComponent

procedure InsertServiceItemComponent(var ServiceItemComponent: Record "Service Item Component", BOMComponent: Record "BOM Component", BOMComponent2: Record "BOM Component", SalesHeader: Record "Sales Header", SalesShipmentLine: Record "Sales Shipment Line")

Parameters

Name Type Description
ServiceItemComponent Table Microsoft.Service.Item."Service Item Component"
BOMComponent Table Microsoft.Inventory.BOM."BOM Component"
BOMComponent2 Table Microsoft.Inventory.BOM."BOM Component"
SalesHeader Table Microsoft.Sales.Document."Sales Header"
SalesShipmentLine Table Microsoft.Sales.History."Sales Shipment Line"

CreateServItemOnSalesLineShpt

procedure CreateServItemOnSalesLineShpt(SalesHeader: Record "Sales Header", SalesLine: Record "Sales Line", SalesShipmentLine: Record "Sales Shipment Line")

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"
SalesLine Table Microsoft.Sales.Document."Sales Line"
SalesShipmentLine Table Microsoft.Sales.History."Sales Shipment Line"

CalcServiceWarrantyDates

procedure CalcServiceWarrantyDates(var ServiceItem: Record "Service Item", StartingWarrantyDate: Date, ItemTrackingWarrantyDateFormula: DateFormula, ServMgtSetupDefaultWarrantyDuration: DateFormula)

Parameters

Name Type Description
ServiceItem Table Microsoft.Service.Item."Service Item"
StartingWarrantyDate Date
ItemTrackingWarrantyDateFormula DateFormula
ServMgtSetupDefaultWarrantyDuration DateFormula

CreateServItemOnServItemLine

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

Parameters

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

CalcAmountLCY

procedure CalcAmountLCY(FCAmount: Decimal, CurrencyFactor: Decimal, CurrencyCode: Code[10], CurrencyDate: Date): Decimal

Parameters

Name Type Description
FCAmount Decimal
CurrencyFactor Decimal
CurrencyCode Code[10]
CurrencyDate Date

Returns

Type Description
Decimal

CopyReservationEntry

procedure CopyReservationEntry(SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

CopyReservationEntryService

procedure CopyReservationEntryService(ServHeader: Record "Service Header")

Parameters

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

CreateServItemOnSalesInvoice

procedure CreateServItemOnSalesInvoice(var SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

ReturnServItemComp

procedure ReturnServItemComp(var TempServItem: Record "Service Item" temporary, var TempServItemComp: Record "Service Item Component" temporary)

Parameters

Name Type Description
TempServItem Table Microsoft.Service.Item."Service Item"
TempServItemComp Table Microsoft.Service.Item."Service Item Component"

DeleteServItemOnSaleCreditMemo

procedure DeleteServItemOnSaleCreditMemo(SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

CopyReservation

procedure CopyReservation(PurchaseHeader: Record "Purchase Header")

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"

DoesSalesLineNeedServiceItemCreation

procedure DoesSalesLineNeedServiceItemCreation(SalesLine: Record "Sales Line", var Item: Record Item, var ServItemGr: Record "Service Item Group"): Boolean

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"
Item Table Microsoft.Inventory.Item.Item
ServItemGr Table Microsoft.Service.Item."Service Item Group"

Returns

Type Description
Boolean

DoesPurchaseLineNeedServiceItemCreation

procedure DoesPurchaseLineNeedServiceItemCreation(PurchaseLine: Record "Purchase Line"): Boolean

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

Returns

Type Description
Boolean

Events

OnAddOrReplaceSIComponentPermanentTemporary

[IntegrationEvent(False,False)]
local procedure OnAddOrReplaceSIComponentPermanentTemporary(var ServItem: Record "Service Item", var ServLine: Record "Service Line", var IsHandled: Boolean)

Parameters

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

OnAfterInitNewServItemComponent

[IntegrationEvent(False,False)]
local procedure OnAfterInitNewServItemComponent(var ServItemComponent: Record "Service Item Component", ServiceLine: Record "Service Line")

Parameters

Name Type Description
ServItemComponent Table Microsoft.Service.Item."Service Item Component"
ServiceLine Table Microsoft.Service.Document."Service Line"

OnBeforeCopyReservationEntry

[IntegrationEvent(False,False)]
local procedure OnBeforeCopyReservationEntry(SalesHeader: Record "Sales Header", var TempReservationEntry: Record "Reservation Entry" temporary)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"
TempReservationEntry Table Microsoft.Inventory.Tracking."Reservation Entry"

OnBeforeCreateServItemOnSalesLineShpt

[IntegrationEvent(False,False)]
local procedure OnBeforeCreateServItemOnSalesLineShpt(SalesHeader: Record "Sales Header", SalesLine: Record "Sales Line", SalesShipmentLine: Record "Sales Shipment Line", var IsHandled: Boolean, var TempReservEntry: Record "Reservation Entry", var TempServiceItem: Record "Service Item" temporary, var TempServiceItemComponent: Record "Service Item Component" temporary)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"
SalesLine Table Microsoft.Sales.Document."Sales Line"
SalesShipmentLine Table Microsoft.Sales.History."Sales Shipment Line"
IsHandled Boolean
TempReservEntry Table Microsoft.Inventory.Tracking."Reservation Entry"
TempServiceItem Table Microsoft.Service.Item."Service Item"
TempServiceItemComponent Table Microsoft.Service.Item."Service Item Component"

OnBeforeCreateServItemOnServItemLine

[IntegrationEvent(False,False)]
local procedure OnBeforeCreateServItemOnServItemLine(var ServItemLine: Record "Service Item Line")

Parameters

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

OnBeforeDeleteServItemOnSaleCreditMemo

[IntegrationEvent(False,False)]
local procedure OnBeforeDeleteServItemOnSaleCreditMemo(SalesHeader: Record "Sales Header", var IsHandled: Boolean)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"
IsHandled Boolean

OnBeforeInsertServItemComponent

[IntegrationEvent(False,False)]
local procedure OnBeforeInsertServItemComponent(var ServiceItemComponent: Record "Service Item Component", ServiceItem: Record "Service Item", SalesHeader: Record "Sales Header", SalesShipmentLine: Record "Sales Shipment Line", BOMComponent: Record "BOM Component", BOMComponent2: Record "BOM Component")

Parameters

Name Type Description
ServiceItemComponent Table Microsoft.Service.Item."Service Item Component"
ServiceItem Table Microsoft.Service.Item."Service Item"
SalesHeader Table Microsoft.Sales.Document."Sales Header"
SalesShipmentLine Table Microsoft.Sales.History."Sales Shipment Line"
BOMComponent Table Microsoft.Inventory.BOM."BOM Component"
BOMComponent2 Table Microsoft.Inventory.BOM."BOM Component"

OnBeforeInsertNewServItemComponent

[IntegrationEvent(False,False)]
local procedure OnBeforeInsertNewServItemComponent(var ServiceItemComponent: Record "Service Item Component", ServiceLine: Record "Service Line")

Parameters

Name Type Description
ServiceItemComponent Table Microsoft.Service.Item."Service Item Component"
ServiceLine Table Microsoft.Service.Document."Service Line"

OnBeforeReplaceSIComponent

[IntegrationEvent(False,False)]
local procedure OnBeforeReplaceSIComponent(var ServiceLine: Record "Service Line", ServiceHeader: Record "Service Header", ServShptDocNo: Code[20], ServShptLineNo: Integer, var TempTrackingSpecification: Record "Tracking Specification" temporary, var IsHandled: Boolean)

Parameters

Name Type Description
ServiceLine Table Microsoft.Service.Document."Service Line"
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServShptDocNo Code[20]
ServShptLineNo Integer
TempTrackingSpecification Table Microsoft.Inventory.Tracking."Tracking Specification"
IsHandled Boolean

OnCreateServItemOnSalesLineShpt

[IntegrationEvent(False,False)]
local procedure OnCreateServItemOnSalesLineShpt(var ServiceItem: Record "Service Item", SalesHeader: Record "Sales Header", SalesLine: Record "Sales Line")

Parameters

Name Type Description
ServiceItem Table Microsoft.Service.Item."Service Item"
SalesHeader Table Microsoft.Sales.Document."Sales Header"
SalesLine Table Microsoft.Sales.Document."Sales Line"

OnCreateServItemOnServItemLine

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

Parameters

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

OnCreateServItemOnServItemLineOnBeforeServItemModify

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

Parameters

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

OnCreateServItemOnSalesLineShptOnAfterAddServItemComponents

[IntegrationEvent(False,False)]
local procedure OnCreateServItemOnSalesLineShptOnAfterAddServItemComponents(var SalesHeader: Record "Sales Header", var SalesLine: Record "Sales Line", var SalesShipmentLine: Record "Sales Shipment Line", var ServiceItem: Record "Service Item", var TempServiceItem: Record "Service Item" temporary, var TempServiceItemComp: Record "Service Item Component" temporary)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"
SalesLine Table Microsoft.Sales.Document."Sales Line"
SalesShipmentLine Table Microsoft.Sales.History."Sales Shipment Line"
ServiceItem Table Microsoft.Service.Item."Service Item"
TempServiceItem Table Microsoft.Service.Item."Service Item"
TempServiceItemComp Table Microsoft.Service.Item."Service Item Component"

OnCreateServItemOnSalesLineShptOnAfterCalcShouldCreateServiceItem

[IntegrationEvent(False,False)]
local procedure OnCreateServItemOnSalesLineShptOnAfterCalcShouldCreateServiceItem(SalesLine: Record "Sales Line", SalesShipmentLine: Record "Sales Shipment Line", var SerialNo: Code[50], var ServItem: Record "Service Item", var ServItemWithSerialNoExist: Boolean, var ShouldCreateServiceItem: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"
SalesShipmentLine Table Microsoft.Sales.History."Sales Shipment Line"
SerialNo Code[50]
ServItem Table Microsoft.Service.Item."Service Item"
ServItemWithSerialNoExist Boolean
ShouldCreateServiceItem Boolean

CreateServItemOnSalesLineShptOnBeforeInsertServiceItemComponents

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

Parameters

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

OnCreateServItemOnSalesLineShptOnAfterInsertServiceItem

[IntegrationEvent(False,False)]
local procedure OnCreateServItemOnSalesLineShptOnAfterInsertServiceItem(var ServiceItem: Record "Service Item", SalesHeader: Record "Sales Header", SalesLine: Record "Sales Line", SalesShipmentLine: Record "Sales Shipment Line", var TempReservEntry: Record "Reservation Entry" temporary, ServItemWithSerialNoExist: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
ServiceItem Table Microsoft.Service.Item."Service Item"
SalesHeader Table Microsoft.Sales.Document."Sales Header"
SalesLine Table Microsoft.Sales.Document."Sales Line"
SalesShipmentLine Table Microsoft.Sales.History."Sales Shipment Line"
TempReservEntry Table Microsoft.Inventory.Tracking."Reservation Entry"
ServItemWithSerialNoExist Boolean
IsHandled Boolean

OnAfterCreateServItemOnServItemLine

[IntegrationEvent(False,False)]
local procedure OnAfterCreateServItemOnServItemLine(ServiceItemLine: Record "Service Item Line")

Parameters

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

OnBeforeCreateServItemOnSalesInvoice

[IntegrationEvent(False,False)]
local procedure OnBeforeCreateServItemOnSalesInvoice(var SalesHeader: Record "Sales Header", var SalesLine: Record "Sales Line", var IsHandled: Boolean)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"
SalesLine Table Microsoft.Sales.Document."Sales Line"
IsHandled Boolean

OnCopyReservationEntryLineOnBeforeReservationEntryFindSet

[IntegrationEvent(False,False)]
local procedure OnCopyReservationEntryLineOnBeforeReservationEntryFindSet(SalesLine: Record "Sales Line", var ReservationEntry: Record "Reservation Entry")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"
ReservationEntry Table Microsoft.Inventory.Tracking."Reservation Entry"

OnBeforeCopyReservationEntryLine

[IntegrationEvent(False,False)]
local procedure OnBeforeCopyReservationEntryLine(SalesLine: Record "Sales Line", var TempReservationEntry: Record "Reservation Entry" temporary, var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"
TempReservationEntry Table Microsoft.Inventory.Tracking."Reservation Entry"
IsHandled Boolean

OnBeforeDoesSalesLineNeedServiceItemCreation

[IntegrationEvent(False,False)]
local procedure OnBeforeDoesSalesLineNeedServiceItemCreation(SalesLine: Record "Sales Line", var SalesLineNeedsServiceItem: Boolean, var Item: Record Item, var ServItemGr: Record "Service Item Group", var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"
SalesLineNeedsServiceItem Boolean
Item Table Microsoft.Inventory.Item.Item
ServItemGr Table Microsoft.Service.Item."Service Item Group"
IsHandled Boolean

OnBeforeDoesPurchaseLineNeedServiceItemCreation

[IntegrationEvent(False,False)]
local procedure OnBeforeDoesPurchaseLineNeedServiceItemCreation(PurchaseLine: Record "Purchase Line", var PurchaseLineNeedsServiceItem: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
PurchaseLineNeedsServiceItem Boolean
IsHandled Boolean

OnBeforeCopyReservationEntryLineAfterCheckSalesLineNeedsServiceItemCreation

[IntegrationEvent(False,False)]
local procedure OnBeforeCopyReservationEntryLineAfterCheckSalesLineNeedsServiceItemCreation(var SalesLine: Record "Sales Line", var SalesLineNeedServiceItemCreation: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"
SalesLineNeedServiceItemCreation Boolean

OnCreateServItemOnServItemLineOnBeforeServiceItemInsert

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

Parameters

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

See also