Skip to content

KVSKBADocumentPrint#

Events#

OnBeforeCalcSalesDisc(Record Sales Header, Boolean) :#

Summary: Integration event that allows customization before calculating sales discounts.

[IntegrationEvent(false, false)]
local procedure OnBeforeCalcSalesDisc(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBADocumentPrint", 'OnBeforeCalcSalesDisc', '', false, false)]
local procedure DoSomethingOnBeforeCalcSalesDisc(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)
begin
end;

Parameters:

  • SalesHeader: Sales header record for which discounts will be calculated
  • IsHandled: Variable indicating whether the operation has been handled by a subscriber

Remarks: Set IsHandled to true to skip the standard discount calculation logic

Summary: Integration event that allows customization of the print with logo setting before saving reports as PDF.

[IntegrationEvent(false, false)]
local procedure OnBeforeSetPrintWithLogo(var ReportID: Integer; RecordVariant: Variant; var PrintWithLogo: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBADocumentPrint", 'OnBeforeSetPrintWithLogo', '', false, false)]
local procedure DoSomethingOnBeforeSetPrintWithLogo(var ReportID: Integer; RecordVariant: Variant; var PrintWithLogo: Boolean)
begin
end;

Parameters:

  • ReportID: ID of the report being processed
  • RecordVariant: Record variant containing the source data
  • PrintWithLogo: Variable indicating whether to print with logo (can be modified by subscribers)

Remarks: Use this event to control logo printing based on report type or record data

OnBeforePrintProformaServiceInvoice(Record Service Header, Enum Report Selection Usage, Boolean) :#

[IntegrationEvent(false, false)]
local procedure OnBeforePrintProformaServiceInvoice(ServiceHeader: Record "Service Header"; ReportSelectionUsage: Enum "Report Selection Usage"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBADocumentPrint", 'OnBeforePrintProformaServiceInvoice', '', false, false)]
local procedure DoSomethingOnBeforePrintProformaServiceInvoice(ServiceHeader: Record "Service Header"; ReportSelectionUsage: Enum "Report Selection Usage"; var IsHandled: Boolean)
begin
end;

OnBeforePrintProformaCreditMemo(Record Sales Header, Enum Report Selection Usage, Boolean) :#

[IntegrationEvent(false, false)]
local procedure OnBeforePrintProformaCreditMemo(SalesHeader: Record "Sales Header"; ReportSelectionUsage: Enum "Report Selection Usage"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBADocumentPrint", 'OnBeforePrintProformaCreditMemo', '', false, false)]
local procedure DoSomethingOnBeforePrintProformaCreditMemo(SalesHeader: Record "Sales Header"; ReportSelectionUsage: Enum "Report Selection Usage"; var IsHandled: Boolean)
begin
end;