ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] codeunit 80 "Sales-Post" - OnUpdatePostingNo

Open gretanorv opened this issue 3 years ago • 3 comments

Hello, would it be possible to add OnUpdatePostingNo, event to codeunit 80 "Sales-Post", like this:

    local procedure UpdatePostingNo(var SalesHeader: Record "Sales Header"; var NoSeriesMgt: Codeunit NoSeriesManagement; var ModifyHeader: Boolean) 
... 
                      end;
                 end;
                 if PreviewMode then
                     "Posting No." := PostingPreviewNoTok;
>                 OnUpdatePostingNo(SalesHeader, PreviewMode);//New Event 
                 // Check for posting conflicts.
                 if not PreviewMode then
                     if "Document Type" in ["Document Type"::Order, "Document Type"::Invoice] then begin
                         if SalesInvHeader.Get("Posting No.") then 
  
     [IntegrationEvent(false, false)]
     local procedure OnUpdatePostingNo(var SalesHeader: Record "Sales Header"; var PreviewMode: Boolean)
     begin
     end; 

gretanorv avatar Apr 05 '23 10:04 gretanorv

We already have this code

            if PreviewMode then begin
                "Posting No." := PostingPreviewNoTok;
                OnSetPostingPreviewDocumentNo("Posting No.");
            end;

is it enough for your purpose?

AlexanderYakunin avatar Apr 25 '23 11:04 AlexanderYakunin

If your provided event would have SalesHeader as a parameter passed as a copy, then it would be enough. Would it be possible to add it?

gretanorv avatar May 31 '23 06:05 gretanorv

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: 11007.

JesperSchulz avatar Jun 05 '23 18:06 JesperSchulz