Skip to content

KVSKBAServiceDocArchiveMgmt#

Events#

OnBeforeCopySrvDocumentTexttoSrvDocumentTextArch(Record Service Header, Record Service Header Archive, Boolean) :#

Summary: Event raised before copying service document texts to the archive.

[IntegrationEvent(false, false)]
local procedure OnBeforeCopySrvDocumentTexttoSrvDocumentTextArch(ServiceHeader: Record "Service Header"; ServiceHeaderArchive: Record "Service Header Archive"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAServiceDocArchiveMgmt", 'OnBeforeCopySrvDocumentTexttoSrvDocumentTextArch', '', false, false)]
local procedure DoSomethingOnBeforeCopySrvDocumentTexttoSrvDocumentTextArch(ServiceHeader: Record "Service Header"; ServiceHeaderArchive: Record "Service Header Archive"; var IsHandled: Boolean)
begin
end;

Parameters:

  • ServiceHeader: The source service header
  • ServiceHeaderArchive: The target service header archive
  • IsHandled: Set to true to skip the standard copy process

Remarks: This integration event allows extensions to intercept and customize the text archiving process before service document texts are copied to the archive. Subscribe to this event to implement custom text archiving logic, filter which texts should be archived, perform pre-archiving validations, or completely override the standard archiving by setting IsHandled to true. Called during the document archiving process for all text types (header, line, and item line texts). Useful for implementing custom archiving rules, handling special text types, or integrating with external documentation systems.

OnBeforeCheckBeforeRestore(Record Service Header Archive, Boolean) :#

Summary: Event raised before validating if a service document can be restored from archive.

[IntegrationEvent(false, false)]
local procedure OnBeforeCheckBeforeRestore(ServiceHeaderArchive: Record "Service Header Archive"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAServiceDocArchiveMgmt", 'OnBeforeCheckBeforeRestore', '', false, false)]
local procedure DoSomethingOnBeforeCheckBeforeRestore(ServiceHeaderArchive: Record "Service Header Archive"; var IsHandled: Boolean)
begin
end;

Parameters:

  • ServiceHeaderArchive: The service header archive to be restored
  • IsHandled: Set to true to skip the standard validation checks

Remarks: This integration event allows extensions to intercept and customize the validation process before restoring a service document from archive. Subscribe to this event to implement custom validation rules, perform additional checks, add business logic constraints, or completely override the standard validation by setting IsHandled to true. The standard checks include verifying quote release status and checking for drop shipment or special order lines. Called before any restore operation begins. Useful for implementing custom business rules that determine whether a document can be safely restored.

OnBeforeCopySrvDocumentTextArchtoSrvDocumentText(Record Service Header, Record Service Header Archive, Boolean) :#

Summary: Event raised before copying service document texts from archive to active document.

[IntegrationEvent(false, false)]
local procedure OnBeforeCopySrvDocumentTextArchtoSrvDocumentText(ServiceHeader: Record "Service Header"; ServiceHeaderArchive: Record "Service Header Archive"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAServiceDocArchiveMgmt", 'OnBeforeCopySrvDocumentTextArchtoSrvDocumentText', '', false, false)]
local procedure DoSomethingOnBeforeCopySrvDocumentTextArchtoSrvDocumentText(ServiceHeader: Record "Service Header"; ServiceHeaderArchive: Record "Service Header Archive"; var IsHandled: Boolean)
begin
end;

Parameters:

  • ServiceHeader: The target service header
  • ServiceHeaderArchive: The source service header archive
  • IsHandled: Set to true to skip the standard copy process

Remarks: This integration event allows extensions to intercept and customize the text restoration process before archived service document texts are copied back to the active document. Subscribe to this event to implement custom text restoration logic, filter which texts should be restored, perform pre-restoration validations, or completely override the standard restoration by setting IsHandled to true. Called during the document restore operation for all text types (header, line, and item line texts). Useful for implementing custom restoration rules, handling special text types, or integrating with external documentation systems during restore operations.