ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Bug]: Post+Print warehouseshipment is printing ALL shipmentheaders in the database!

Open Pieterheinevdm opened this issue 2 years ago • 6 comments

Describe the issue

Post+Print warehouseshipment is printing ALL shipmentheaders in the database!

problem: codeunit 5746 "Sales Whse. Post Shipment" procedure PrintDocuments at minimum a SalesShipmentHeader.MarkedOnly(true)

    if DocumentEntryToPrint.FindSet() then
        repeat
            SalesShipmentHeader.Get(DocumentEntryToPrint."Document No.");
            SalesShipmentHeader.Mark(true);
        until DocumentEntryToPrint.Next() = 0;
    SalesShipmentHeader.MarkedOnly(true); //NEW
    SalesShipmentHeader.PrintRecords(false);

Apply same fix for sales invoices 10lines before this line in same procedure

Expected behavior

Only print the now posted "Sales Shipment Headers" (and Sales Invoice Headers)

Steps to reproduce

Post+Print warehouseshipment

Additional context

No response

I will provide a fix for a bug

  • [ ] I will provide a fix for a bug

Pieterheinevdm avatar Nov 08 '24 12:11 Pieterheinevdm

Is this being looked at? Would say that this is quite a bug for some of our customers with a high Warehouse Activity. @Pieterheinevdm

AlexanderLundq avatar Nov 19 '24 07:11 AlexanderLundq

A temporary solution for this issue is to subscribe to the OnBeforePrintRecords event from the Sales Shipment Header table and filter SalesShptHeader using the MarkedOnly property.

grosugeorge avatar Dec 10 '24 13:12 grosugeorge

Hello @JesperSchulz , Is there any ETA when it's going to be fixed? Since bug is reported we got two update (25.5 is the third but I don't see anything in release notes). It's only one line of code missing here and solution already provided above.

konstantinlevchenko avatar Dec 21 '24 00:12 konstantinlevchenko

@AlexanderLundq, @konstantinlevchenko, this seems urgent, but was unfortunately logged wrongly here on GitHub. Urgent issues with customer impact should always get logged as support cases, and not here on GitHub! The ALAppExtensions repository is only for extensibility requests for Dynamics 365 Business Central or pull requests towards the 1st party Business Central apps.

Anyway, this issue was reported as a support case too and has been fixed for 25.0, 25.1, 25.2, 25.x and in our main branch back in November.

@konstantinlevchenko, version 25.5 doesn't exist yet - maybe you meant 24.5?

JesperSchulz avatar Jan 02 '25 12:01 JesperSchulz

@JesperSchulz , yes, that was a typo, I meant 25.2. I did not tested in 25.2, but I did in 25.0 and 25.1 and bug was still there. Do you have any link on release notes where it says this bug is fixed? I did not created support case because it was reported already and I expected it should be fixed. Will retest in 25.2 and contact support if still an issue.

regards, K.

konstantinlevchenko avatar Jan 02 '25 14:01 konstantinlevchenko

This is published on PPAC.

Title: Warehouse Shipment - "Post & Print" action issue - printing all posted documents

Description: "Post & Print" action from Warehouse Shipment causes printing all warehouse shipments, not only the one that is currently being posted. Or it may take much longer than expected due to this filtering issue.

This issue affects versions 25.0 and 25.1.

Solution: Fix will be included in 25.2 minor update.

Hotfixes for versions 25.0 (app build 25.0.23364.26688) and 25.1 (app build 25.1.25873.26693) are already prepared but might be still not deployed for particular environment.

Note: Temporary workaround is not to use "Post & Print" action, but just to post and then to print manually from posted document.

JesperSchulz avatar Jan 06 '25 10:01 JesperSchulz