Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[event publisher insert] in event "Copy Document Mgt." (Codeunit 6620) proc "CheckFirstLineShipped" #27471

Open
hobali opened this issue Oct 18, 2024 · 0 comments

Comments

@hobali
Copy link

hobali commented Oct 18, 2024

Dear Support,

Could you please create a new publisher in "Copy Document Mgt." (Codeunit 6620) and a bit the following code, at procedure "CheckFirstLineShipped"? The publishers name could be: "OnAfterSetSalesCombDocLineNoOnCheckFirstLineShipped".

<<<<< Original Code >>>>>

if (DocNo = '') and (ShipmentLineNo = 0) and FirstLineShipped then begin
            FirstLineShipped := false;
            SalesCombDocLineNo := NextLineNo;
            NextLineNo := NextLineNo + 10000;
        end;

<<<<< Modified >>>>>

[IntegrationEvent(false, false)]
local procedure OnAfterSetSalesCombDocLineNoOnCheckFirstLineShipped(FromSalesLineArchive: Record "Sales Line Archive"; NextLineNo: Integer; var IsHandled: Boolean)
    begin
    end;
if (DocNo = '') and (ShipmentLineNo = 0) and FirstLineShipped then begin
            FirstLineShipped := false;
            SalesCombDocLineNo := NextLineNo;
            IsHandled := false;
            OnAfterSetSalesCombDocLineNoOnCheckFirstLineShipped(FromSalesLineArchive, NextLineNo, IsHandled);
            if not IsHandled then
                NextLineNo := NextLineNo + 10000;
        end;

Additional context
We need to skip the Release part of the code for several times due to a customer condition.

Thank you in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant