ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Bug]: Production Journal Preview Posting ignores record filters

Open aobsgit opened this issue 2 years ago • 1 comments

Describe the issue

When posting production journal in preview mode, the existing code does not consider filters applied. The preview is consequently trying to post complete item journal, regardless of template, batch or any other filters applied.

Expected behavior

Filters applied in opened production journal (system and custom) should be applied when running post preview.

Steps to reproduce

Released production order with output and components to be posted. Run production journal and Preview Post.

Additional context

Below is the code from page 5510 "Production Journal". Problem is in line 1, where Copy should be used

protected procedure MarkRelevantRec(var ItemJournalLine: Record "Item Journal Line")
begin
    ItemJournalLine := Rec;  ---> ItemJournalLine.Copy(Rec);
    if ItemJournalLine.FindSet() then begin
        repeat
            case ItemJournalLine."Entry Type" of
                Rec."Entry Type"::Consumption:
                    if ItemJournalLine."Quantity (Base)" <> 0 then
                        ItemJournalLine.Mark(true);
                Rec."Entry Type"::Output:
                    if not ItemJournalLine.TimeIsEmpty() or (ItemJournalLine."Output Quantity (Base)" <> 0) or (ItemJournalLine."Scrap Quantity (Base)" <> 0) then
                        ItemJournalLine.Mark(true);
            end;
        until ItemJournalLine.Next() = 0;
        ItemJournalLine.MarkedOnly(true);
    end;
end;

aobsgit avatar Jan 09 '24 12:01 aobsgit

That sounds like a product defect! Unfortunately, this repository is only for extensibility requests for Dynamics 365 Business Central or pull requests towards the 1st party Business Central apps. We suggest that you open a support case or file a bug to ensure that all Business Central users benefit from your catch as soon as possible:

On premises - https://support.microsoft.com/en-us/supportforbusiness/productselection?sapId=93d37907-ad94-d591-22e9-593cfa09dd3f

Cloud – contact your partner, or if you are a partner open a support incident through Partner Center - https://partner.microsoft.com/en-us/pcv/dashboard/overview

JesperSchulz avatar Feb 15 '24 12:02 JesperSchulz