Skip to content

Event request - page 7002 "Sales Prices" #30169

@exnihiloo

Description

@exnihiloo

Why do you need this change?

  1. procedure SetRecFilters
    Please add an integration event in procedure SetRecFilters() to allow customizing date filter logic.

    Alternatives Evaluated
    Reviewed existing events on Page 7002 and related objects, but none allow intercepting or replacing the date filter logic inside SetRecFilters().
    Standard extension patterns (page extensions, triggers, and filter manipulation) were insufficient because the base code overwrites filters internally, leaving no reliable hook to adjust behavior.
    Re-implementing the full procedure was considered but rejected due to poor maintainability and upgrade risks

    Performance Considerations
    The event would be triggered only when SetRecFilters() is executed (typically on user interaction such as filter updates or page refresh).
    Frequency is relatively low and user-driven, not part of heavy background processing.

    Data Sensitivity Review
    The event exposes only a Sales Price record reference, which is already accessible within the page context.
    No additional sensitive data is introduced beyond what is already available to the page.
    The change does not alter permissions or data visibility.
    Therefore, there are no additional data security risks associated with this event.

Describe the request

procedure SetRecFilters()
begin
    ...

    if CurrencyCodeFilter <> '' then
        Rec.SetFilter("Currency Code", CurrencyCodeFilter)
    else
        Rec.SetRange("Currency Code");

    OnApplySalesPriceFilters(Rec); //New event

    case SalesTypeFilter of
        SalesTypeFilter::Customer:
            CheckFilters(DATABASE::Customer, SalesCodeFilter);
        SalesTypeFilter::"Customer Price Group":
            CheckFilters(DATABASE::"Customer Price Group", SalesCodeFilter);
        SalesTypeFilter::Campaign:
            CheckFilters(DATABASE::Campaign, SalesCodeFilter);
    end;
    ...
end;
[IntegrationEvent(false, false)]
local procedure OnApplySalesPriceFilters(var SalesPrice: Record "Sales Price")
begin
end;

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaevent-requestRequest for adding an event

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions