Skip to content

KVSKBAServiceLine#

Procedures#

CalcUnitPriceInServiceLine(Record Service Line) :#

Summary: Calculate Unit Price in Service Line

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

Parameters:

  • ServiceLine: Record to calculate

Events#

OnBeforeCalcUnitPriceInServiceLine(Record Service Line, Boolean) :#

Summary: Event raised before calculating the unit price in a service line.

[IntegrationEvent(false, false)]
local procedure OnBeforeCalcUnitPriceInServiceLine(var ServiceLine: Record "Service Line"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAServiceLine", 'OnBeforeCalcUnitPriceInServiceLine', '', false, false)]
local procedure DoSomethingOnBeforeCalcUnitPriceInServiceLine(var ServiceLine: Record "Service Line"; var IsHandled: Boolean)
begin
end;

Parameters:

  • ServiceLine: The service line being calculated
  • IsHandled: Set to true to skip the standard unit price calculation

Remarks: This integration event allows extensions to intercept and customize the unit price calculation process before the standard calculation executes. Subscribe to this event to implement custom pricing logic, override standard price calculations, perform validations, or completely skip the standard calculation by setting IsHandled to true. The standard calculation multiplies the unit price by the price unit and enforces rules for special line types (Subtotal, Bundle, Heading). Useful for implementing custom pricing rules, integrating with external pricing systems, or handling special pricing scenarios specific to service lines.

OnBeforeCalcUnitPricePUInServiceLine(Record Service Line, Boolean) :#

Summary: Event raised before calculating the unit price from the unit price per price unit.

[IntegrationEvent(false, false)]
local procedure OnBeforeCalcUnitPricePUInServiceLine(var ServiceLine: Record "Service Line"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAServiceLine", 'OnBeforeCalcUnitPricePUInServiceLine', '', false, false)]
local procedure DoSomethingOnBeforeCalcUnitPricePUInServiceLine(var ServiceLine: Record "Service Line"; var IsHandled: Boolean)
begin
end;

Parameters:

  • ServiceLine: The service line being calculated
  • IsHandled: Set to true to skip the standard calculation

Remarks: This integration event allows extensions to intercept and customize the reverse unit price calculation process before the standard calculation executes. Subscribe to this event to implement custom calculation logic when deriving the unit price from the price per price unit, override standard calculations, or completely skip the standard process by setting IsHandled to true. The standard calculation divides the unit price per price unit by the price unit. Useful for implementing custom pricing formulas, handling special rounding rules, or integrating with external pricing systems that use different calculation methods.

OnBeforeCalcPUInServiceLine(Record Service Line, Boolean) :#

Summary: Event raised before calculating the unit price per price unit from the price unit.

[IntegrationEvent(false, false)]
local procedure OnBeforeCalcPUInServiceLine(var ServiceLine: Record "Service Line"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAServiceLine", 'OnBeforeCalcPUInServiceLine', '', false, false)]
local procedure DoSomethingOnBeforeCalcPUInServiceLine(var ServiceLine: Record "Service Line"; var IsHandled: Boolean)
begin
end;

Parameters:

  • ServiceLine: The service line being calculated
  • IsHandled: Set to true to skip the standard calculation

Remarks: This integration event allows extensions to intercept and customize the calculation process before the unit price per price unit is calculated from the price unit field. Subscribe to this event to implement custom calculation logic, override standard price multiplication, perform pre-calculation validations, or completely skip the standard process by setting IsHandled to true. The standard calculation multiplies the unit price by the price unit to determine the total price per price unit. Useful for implementing custom pricing formulas, handling special price unit scenarios, or integrating with external pricing systems.

OnBeforeCalcNoInServiceLine(Record Service Line, Boolean) :#

Summary: Event raised before calculating the unit price per price unit after No. validation.

[IntegrationEvent(false, false)]
local procedure OnBeforeCalcNoInServiceLine(var ServiceLine: Record "Service Line"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAServiceLine", 'OnBeforeCalcNoInServiceLine', '', false, false)]
local procedure DoSomethingOnBeforeCalcNoInServiceLine(var ServiceLine: Record "Service Line"; var IsHandled: Boolean)
begin
end;

Parameters:

  • ServiceLine: The service line being calculated
  • IsHandled: Set to true to skip the standard calculation

Remarks: This integration event allows extensions to intercept and customize the calculation process that occurs after the No. field is validated on a service line. Subscribe to this event to implement custom pricing logic when items, resources, or G/L accounts are assigned, override the standard calculation, or completely skip the standard process by setting IsHandled to true. The standard calculation multiplies the unit price by the price unit to determine the price per price unit. Useful for implementing custom pricing rules that trigger on number assignment, integrating with external pricing systems, or handling special initialization scenarios.

OnBeforeTranslateServiceLineDescription(Record Service Line, Boolean) :#

Summary: Event raised before translating a service line description to the document's language.

[IntegrationEvent(false, false)]
local procedure OnBeforeTranslateServiceLineDescription(var ServiceLine: Record "Service Line"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAServiceLine", 'OnBeforeTranslateServiceLineDescription', '', false, false)]
local procedure DoSomethingOnBeforeTranslateServiceLineDescription(var ServiceLine: Record "Service Line"; var IsHandled: Boolean)
begin
end;

Parameters:

  • ServiceLine: The service line with the description to translate
  • IsHandled: Set to true to skip the standard translation process

Remarks: This integration event allows extensions to intercept and customize the description translation process before the standard language translation executes. Subscribe to this event to implement custom translation logic, use alternative translation sources, handle special description formats, or completely skip the standard translation by setting IsHandled to true. The standard process translates contract-related descriptions based on the service header's language code. Useful for implementing custom multilingual support, integrating with external translation services, or handling domain-specific terminology that requires special translation rules.