KVSKBAServiceHeader#
Events#
OnBeforeSetPricingFields(Record Service Header, Boolean) :#
Summary: Event raised before setting pricing fields on a service header.
[IntegrationEvent(false, false)]
local procedure OnBeforeSetPricingFields(var ServiceHeader: Record "Service Header"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAServiceHeader", 'OnBeforeSetPricingFields', '', false, false)]
local procedure DoSomethingOnBeforeSetPricingFields(var ServiceHeader: Record "Service Header"; var IsHandled: Boolean)
begin
end;
Parameters:
ServiceHeader: The service header being processedIsHandled: Set to true to skip the standard pricing field assignment
Remarks: This integration event allows extensions to intercept and customize the pricing field assignment process before standard pricing fields are set on a service header. Subscribe to this event to implement custom pricing logic, override default pricing behavior, perform pre-assignment validations, or completely skip the standard pricing assignment by setting IsHandled to true. Called when pricing-related fields need to be determined or updated. Useful for implementing custom pricing rules, integrating with external pricing systems, or handling special pricing scenarios specific to service documents.
OnBeforeSearchPricingCustomer(Record Service Header, Record Customer, Boolean) :#
Summary: Event raised before searching for the pricing customer on a service header.
[IntegrationEvent(false, false)]
local procedure OnBeforeSearchPricingCustomer(var ServiceHeader: Record "Service Header"; BilltoCustomer: Record "Customer"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAServiceHeader", 'OnBeforeSearchPricingCustomer', '', false, false)]
local procedure DoSomethingOnBeforeSearchPricingCustomer(var ServiceHeader: Record "Service Header"; BilltoCustomer: Record "Customer"; var IsHandled: Boolean)
begin
end;
Parameters:
ServiceHeader: The service header being processedBilltoCustomer: The bill-to customer recordIsHandled: Set to true to skip the standard pricing customer search
Remarks: This integration event allows extensions to intercept and customize the pricing customer determination process before the standard search is performed. Subscribe to this event to implement custom logic for determining which customer should be used for pricing purposes, override the standard customer selection, or completely skip the search by setting IsHandled to true. The BilltoCustomer parameter provides the current bill-to customer for reference. Useful for implementing complex pricing scenarios where different customers might apply for pricing versus billing, or for integrating with external pricing systems that use different customer hierarchies.
OnBeforeOnAfterCopyBillToCustomerFields(Record Service Header, Record Customer, Boolean) :#
Summary: Event raised before processing the copy of bill-to customer fields.
[IntegrationEvent(false, false)]
local procedure OnBeforeOnAfterCopyBillToCustomerFields(var ServiceHeader: Record "Service Header"; Customer: Record "Customer"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAServiceHeader", 'OnBeforeOnAfterCopyBillToCustomerFields', '', false, false)]
local procedure DoSomethingOnBeforeOnAfterCopyBillToCustomerFields(var ServiceHeader: Record "Service Header"; Customer: Record "Customer"; var IsHandled: Boolean)
begin
end;
Parameters:
ServiceHeader: The service header receiving the customer fieldsCustomer: The source customer recordIsHandled: Set to true to skip the standard field copy process
Remarks: This integration event allows extensions to intercept and customize the process before bill-to customer fields are copied to a service header. Subscribe to this event to implement custom field mapping logic, perform pre-copy validations, modify field values before they are applied, or completely override the standard copy process by setting IsHandled to true. Called when the bill-to customer changes or when customer fields need to be refreshed. Useful for implementing custom business rules for field transfers, handling special customer types, or integrating additional customer data beyond standard fields.
OnAfterOnAfterCopyBillToCustomerFields(Record Service Header, Record Customer) :#
Summary: Event raised after bill-to customer fields have been copied to the service header.
[IntegrationEvent(false, false)]
local procedure OnAfterOnAfterCopyBillToCustomerFields(var ServiceHeader: Record "Service Header"; Customer: Record "Customer"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAServiceHeader", 'OnAfterOnAfterCopyBillToCustomerFields', '', false, false)]
local procedure DoSomethingOnAfterOnAfterCopyBillToCustomerFields(var ServiceHeader: Record "Service Header"; Customer: Record "Customer")
begin
end;
Parameters:
ServiceHeader: The service header with copied customer fieldsCustomer: The source customer record
Remarks: This integration event allows extensions to perform additional processing after bill-to customer fields have been copied to a service header. Subscribe to this event to implement post-copy logic, update related records, perform additional field assignments, trigger workflows, or synchronize data with external systems. Called after the standard field copy process completes. The Customer parameter provides access to the source customer data for any additional processing needs. Useful for extending the customer field transfer process with custom business logic or maintaining additional relationships between customers and service documents.
OnBeforeSetDefaultSalespersonOnSalesHeader(Record Service Header, Boolean) :#
Summary: Event raised before setting the default salesperson on a service header.
[IntegrationEvent(false, false)]
local procedure OnBeforeSetDefaultSalespersonOnSalesHeader(var ServiceHeader: Record "Service Header"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAServiceHeader", 'OnBeforeSetDefaultSalespersonOnSalesHeader', '', false, false)]
local procedure DoSomethingOnBeforeSetDefaultSalespersonOnSalesHeader(var ServiceHeader: Record "Service Header"; var IsHandled: Boolean)
begin
end;
Parameters:
ServiceHeader: The service header being processedIsHandled: Set to true to skip the standard salesperson assignment
Remarks: This integration event allows extensions to intercept and customize the default salesperson assignment process before it executes for service headers. Subscribe to this event to implement custom salesperson determination logic, override the standard assignment rules, perform pre-assignment validations, or completely skip the standard process by setting IsHandled to true. The standard process considers user setup, customer salesperson codes, and sales & receivables setup preferences. Useful for implementing custom salesperson assignment rules, handling special service scenarios, or integrating with external workforce management systems.