microsoft / ALAppExtensions

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

[Event Request] Codeunit 7042 "Price Asset - Item Disc. Group" - OnAfterFillAdditionalFields #26723

Closed ZepposBE closed 1 week ago

ZepposBE commented 3 weeks ago

Describe the request

Hello development team,

For some of our features we would like to see the new event added as in the example code below.

 local procedure FillAdditionalFields(var PriceAsset: Record "Price Asset")
    begin
        PriceAsset.Description := ItemDiscountGroup.Description;
        PriceAsset."Unit of Measure Code" := '';
        PriceAsset."Variant Code" := '';
        >>> New Event
        OnAfterFillAdditionalFields(PriceAsset, ItemDiscountGroup);
        <<< New Event
    end;
[IntegrationEvent(false, false)]
    local procedure OnAfterFillAdditionalFields(var PriceAsset: Record "Price Asset" temporary; ItemDiscountGroup: Record "Item Discount Group")
    begin
    end;

There is only one caveat to this code example, the name of the variable in the OnAfterFillAdditionalFields event will have to be different because it's the same as the global variable, but I will leave this naming up to you according to your conventions.

Additional context

For some of our features we need to populate extra data from the Item Disc. Group into the Price Asset record. Business Central already already has these similar events for Item and Resource, but not for these other "Price Asset Types":

JesperSchulz commented 1 week 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: 21487.