ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Codeunit 5760 "Whse.-Post Receipt"

Open Nagaraju17 opened this issue 1 year ago • 3 comments

Why do you need this change?

I Need extra parameter with var type in existing event publisher.

        Database::"Transfer Line":
            begin
                IsHandled := false;
                OnPostSourceDocumentOnBeforePostTransferHeader(TransHeader, WarehouseReceiptHeader, SuppressCommit, CounterSourceDocOK, IsHandled);
                if not IsHandled then begin
                    if HideValidationDialog then
                        TransferPostReceipt.SetHideValidationDialog(HideValidationDialog);
                    TransferPostReceipt.SetWhseRcptHeader(WarehouseReceiptHeader);
                    TransferPostReceipt.SetSuppressCommit(SuppressCommit or PreviewMode);
                    TransferPostReceipt.SetPreviewMode(PreviewMode);
                    TransferPostReceipt.SetCalledBy(Codeunit::"Whse.-Post Receipt");
                    if PreviewMode then
                        PostSourceTransferDocument(TransferPostReceipt)
                    else
                        case WarehouseSetup."Receipt Posting Policy" of
                            WarehouseSetup."Receipt Posting Policy"::"Posting errors are not processed":
                                PostTransferErrorsNotProcessed(TransferPostReceipt);
                            WarehouseSetup."Receipt Posting Policy"::"Stop and show the first posting error":
                                PostSourceTransferDocument(TransferPostReceipt);
                        end;
                end;
                OnPostSourceDocumentOnAfterPostTransferHeader(TransHeader);
                Clear(TransferPostReceipt);
            end;
        else
            **OnPostSourceDocument(WarehouseReceiptHeader, WarehouseReceiptLine);**
    end;

    OnAfterPostSourceDocument(WarehouseReceiptLine);
end;

Describe the request

We need extra parameter "CounterSourceDocOk" with var type to update the count of No. of source documents. Which will be displayed after posting the warehouse receipts. like below

[IntegrationEvent(false, false)] local procedure OnPostSourceDocument(var WhseReceiptHeader: Record "Warehouse Receipt Header"; var WhseReceiptLine: Record "Warehouse Receipt Line";CounterSourceDocOk :Integer) begin end; Internal work item: AB#596548

Nagaraju17 avatar Aug 05 '25 09:08 Nagaraju17

@Nagaraju17 , can you please remove the image from the description and add code snippet instead? This will help our AI tool to read the description accurately.

ChethanT avatar Aug 20 '25 13:08 ChethanT

Hi @ChethanT .. Request is updated..

Nagaraju17 avatar Aug 29 '25 06:08 Nagaraju17

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

JesperSchulz avatar Dec 18 '25 13:12 JesperSchulz