microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
773 stars 610 forks source link

[Event Request] Price UX Management OnBeforeRunPurchasePriceList/OnBeforeRunSalesPriceList to modify Filters before LookUp opens in CopyLines #26709

Closed JonasPatto closed 3 months ago

JonasPatto commented 3 months ago

Describe the request

We need the following Publisher-Events in the Codeunit 7018 "Price UX Management" procedure "Select Price List":

local procedure SelectPriceLists(var PriceListHeader: Record "Price List Header"; var PriceListCode: Code[20]) IsPicked: Boolean;
var
    PurchasePriceLists: Page "Purchase Price Lists";
    SalesPriceLists: Page "Sales Price Lists";
begin
    PriceListCode := '';
    case PriceListHeader."Price Type" of
        "Price Type"::Sale:
            begin
                SalesPriceLists.LookupMode(true);
                SalesPriceLists.SetRecordFilter(PriceListHeader);
                // OnBeforeRunSalesPriceList(SalesPriceLists, PriceListHeader); <-- new
                if SalesPriceLists.RunModal() = Action::LookupOK then begin
                    SalesPriceLists.GetRecord(PriceListHeader);
                    PriceListCode := PriceListHeader.Code;
                end;
            end;
        "Price Type"::Purchase:
            begin
                PurchasePriceLists.LookupMode(true);
                PurchasePriceLists.SetRecordFilter(PriceListHeader);
                // OnBeforeRunPurchasePriceList(PurchasePriceLists, PriceListHeader); <-- new
                if PurchasePriceLists.RunModal() = Action::LookupOK then begin
                    PurchasePriceLists.GetRecord(PriceListHeader);
                    PriceListCode := PriceListHeader.Code;
                end;
            end;
    end;

    OnAfterSelectPriceLists(PriceListHeader, PriceListCode);
    IsPicked := PriceListCode <> '';
end;

[IntegrationEvent(false, false)]
local procedure OnBeforeRunPurchasePriceList(var PurchasePriceLists: Page "Purchase Price Lists"; var PriceListHeader: Record "Price List Header")
begin
end;

[IntegrationEvent(false, false)]
local procedure OnBeforeRunSalesPriceList(var SalesPriceLists: Page "Sales Price Lists"; var PriceListHeader: Record "Price List Header")
begin
end;

Is it possible to make these Publishers available in BC23 as well?

Additional context

We modified the extended Pricing with our own Source Group. During the Process of "CopyLines" in the Purchase Price List only the Source Group of the open Purchase Price List can be copied from. We want to make it possible that our own Source Group is also visible in that context so that Users may copy from our own Price Lists to the Microsoft Purchase Price Lists. Internal work item: AB#539220

tomasevicst commented 3 months ago

Hi,

We are adding publishers only for current release, in this case BC24. If there is a need for customer, or if customer is blocked by some changes, we can backport publisher to previous version, but still you need to open a ticket for that.

JesperSchulz commented 3 months ago

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Build ID: 21509.