Skip to content

[W1] [Event Request] [Parameter Request] - codeunit 7017 "Price List Management" - OnBeforeFindDuplicatePriceListLine #30038

@pri-kise

Description

@pri-kise

Why do you need this change?

We need to set an additional filter on the price list lines (e.g. only check the Price List lines that are in the status active if we don't SearchInside).

Describe the request

Could you please add the parameters AsLineDefaults: Boolean; SearchInside: Boolean; to the event OnBeforeFindDuplicatePriceListLine?

local procedure FindDuplicatePrice(PriceListLine: Record "Price List Line"; AsLineDefaults: Boolean; SearchInside: Boolean; var DuplicatePriceListLine: Record "Price List Line"): Boolean;
begin
    DuplicatePriceListLine.Reset();
    if SearchInside then begin
        DuplicatePriceListLine.SetRange("Price List Code", PriceListLine."Price List Code");
        DuplicatePriceListLine.SetFilter("Line No.", '<>%1', PriceListLine."Line No.");
        if AsLineDefaults then
            SetHeadersFilters(PriceListLine, DuplicatePriceListLine);
    end else begin
        DuplicatePriceListLine.SetFilter("Price List Code", '<>%1', PriceListLine."Price List Code");
        SetHeadersFilters(PriceListLine, DuplicatePriceListLine);
    end;
    SetAssetFilters(PriceListLine, DuplicatePriceListLine);
    //>>Change
    //-OnBeforeFindDuplicatePriceListLine(PriceListLine, DuplicatePriceListLine);
    OnBeforeFindDuplicatePriceListLine(PriceListLine, DuplicatePriceListLine);
    //<<Change
    exit(DuplicatePriceListLine.FindFirst());
end;
    [IntegrationEvent(false, false)]
    //>> Change
    //local procedure OnBeforeFindDuplicatePriceListLine(PriceListLine: Record "Price List Line"; var DuplicatePriceListLine: Record "Price List Line")
    local procedure OnBeforeFindDuplicatePriceListLine(PriceListLine: Record "Price List Line"; AsLineDefaults: Boolean; SearchInside: Boolean; var DuplicatePriceListLine: Record "Price List Line")
    //<< Change
    begin
    end;

Internal work item: AB#634782

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaevent-requestRequest for adding an event

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions