KVSKBAReportselection#
Events#
OnBeforeCaseElseGetOrderTypeByVariant(RecordRef, Variant, Code[10], Boolean) :#
Summary: Integration event raised when GetOrderTypeByVariant encounters an unsupported table type.
[IntegrationEvent(false, false)]
local procedure OnBeforeCaseElseGetOrderTypeByVariant(var RecordRefLoc: RecordRef; var RecordVariant: Variant; var OrderTypeCode: Code[10]; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAReportselection", 'OnBeforeCaseElseGetOrderTypeByVariant', '', false, false)]
local procedure DoSomethingOnBeforeCaseElseGetOrderTypeByVariant(var RecordRefLoc: RecordRef; var RecordVariant: Variant; var OrderTypeCode: Code[10]; var IsHandled: Boolean)
begin
end;
Parameters:
RecordRefLoc: RecordRef pointing to the unsupported table/record.RecordVariant: Original variant parameter passed to GetOrderTypeByVariant.OrderTypeCode: Output parameter for the order type code; set by subscribers to provide custom handling.IsHandled: Set to true by subscribers to indicate custom handling was performed and default empty return should be skipped.
Remarks: This event allows extensions to support additional document types not covered by the standard GetOrderTypeByVariant procedure. Subscribers can examine the RecordRefLoc to determine the table type, extract the appropriate order type field, and return it via OrderTypeCode parameter. Setting IsHandled to true prevents the default empty string return. This extensibility point is essential for custom document types, third-party integrations, or industry-specific extensions that introduce new document headers with order type classifications. The event is raised within the else clause of the case statement in GetOrderTypeByVariant.
OnAfterGetCustomReportSelectionOnAfterSetFilterOnCustomReportSelection(Record Report Selections, Record Custom Report Selection, Code[20], Integer, Boolean, Boolean) :#
Summary: Integration event raised after applying filters to Custom Report Selection records, before checking if the recordset is empty.
[IntegrationEvent(false, false)]
local procedure OnAfterGetCustomReportSelectionOnAfterSetFilterOnCustomReportSelection(var ReportSelections: Record "Report Selections"; var CustomReportSelection: Record "Custom Report Selection"; AccountNo: Code[20]; TableNo: Integer; var ReturnValue: Boolean; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAReportselection", 'OnAfterGetCustomReportSelectionOnAfterSetFilterOnCustomReportSelection', '', false, false)]
local procedure DoSomethingOnAfterGetCustomReportSelectionOnAfterSetFilterOnCustomReportSelection(var ReportSelections: Record "Report Selections"; var CustomReportSelection: Record "Custom Report Selection"; AccountNo: Code[20]; TableNo: Integer; var ReturnValue: Boolean; var IsHandled: Boolean)
begin
end;
Parameters:
ReportSelections: Report Selections record with filters applied from the calling context.CustomReportSelection: Custom Report Selection record with applied filters (Source Type, Source No., Order Type, Email settings).AccountNo: Account number used for filtering (customer/vendor number).TableNo: Table number identifying the source type.ReturnValue: Return value for the parent procedure; can be modified by subscribers.IsHandled: Set to true by subscribers to indicate custom handling and prevent default processing.
Remarks: This event allows extensions to modify the Custom Report Selection filtering logic or implement additional selection criteria after the standard filters have been applied. Subscribers can add additional filters, modify existing filters, change the return value, or completely override the selection logic by setting IsHandled to true. The event is raised in the OnAfterGetCustomReportSelection event subscriber after a cascading filter logic that first tries Source No. + Order Type, then falls back to Order Type only, and finally removes Order Type filter if no records are found. This is useful for implementing custom report selection hierarchies or integrating with third-party report distribution systems.