microsoft / ALAppExtensions

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

[Event Request][Consistency] Codeunit 5720 "Item Reference Management" OnBeforeEnterPurchaseItemReference #21296

Closed warlof closed 1 year ago

warlof commented 1 year ago

Hi there,

we need an integration event in the function EnterPurchaseItemReference with handled pattern.

    procedure EnterPurchaseItemReference(var PurchLine2: Record "Purchase Line")
    var
        IsHandled: Boolean;
        ShouldAssignDescription: Boolean;
    begin
        IsHandled := false;
        OnBeforeEnterPurchaseItemReference(PurchLine2, IsHandled);
        if IsHandled then
            exit;

        with PurchLine2 do

and the related integration event:

    [IntegrationEvent(false, false)]
    local procedure OnBeforeEnterPurchaseItemReference(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean)
    begin
    end;

this will also enforce consistency between purchase and sales flow since such integration event already exists for sales flow: https://github.com/StefanMaron/MSDyn365BC.Code.History/blob/50fc193864bb1255a7bf20462727978d05194eb8/BaseApp/Source/Base%20Application/ItemReferenceManagement.Codeunit.al#L26

JesperSchulz commented 1 year 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: 52253.