microsoft / ALAppExtensions

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

[EventRequest] Codeunit 90 "Purch.-Post" - OnBeforeTestPostingDate #26908

Closed vladsandortnp closed 1 month ago

vladsandortnp commented 1 month ago

Describe the request

Can you please add event OnBeforeTestPostingDate in procedure ValidatePostingAndDocumentDate

Event Publisher would be:

[IntegrationEvent(false, false)] local procedure OnBeforeTestPostingDate(PurchaseHeader: Record "Purchase Header"; PostingDateExists: Boolean; var SkipTestPostingDate: Boolean) begin end;

The procedure would look like:

` local procedure ValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header") var SkipTestPostingDate: Boolean; begin ..... .....

    if not ReplacePostingDate then begin
        OnBeforeTestPostingDate(PurchaseHeader, PostingDateExists, SkipTestPostingDate);
        if not SkipTestPostingDate then
            PurchaseHeader.TestPostingDate(PostingDateExists);
    end;
    ......
    ......

end;`

Additional context

We would like to skip the test of posting date in some specific posting routines and cases. We need an event in the posting codeunit because we will not be able to subscribe to the table function as it is marked OnPrem. Internal work item: AB#542671

azure-boards[bot] commented 1 month ago

✅ Successfully linked to Azure Boards work item(s):

JesperSchulz commented 1 month 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: 22249.