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 Request] Publishers on Page 344 Navigate and Codeunit 6529 "Item Tracking Navigate Mgt." #27910

Open
jmartin93 opened this issue Jan 9, 2025 · 0 comments

Comments

@jmartin93
Copy link

Describe the request

Hi there,

We need some publishers to extend the navigate functionality:

First on page 344 Navigate

    procedure FindTrackingRecords()
    var
        DocNoOfRecords: Integer;
    begin
        Window.Open(Text002);
        Rec.DeleteAll();
        Rec."Entry No." := 0;

        ItemTrackingFilters.SetFilter("Serial No. Filter", SerialNoFilter);
        ItemTrackingFilters.SetFilter("Lot No. Filter", LotNoFilter);
        ItemTrackingFilters.SetFilter("Package No. Filter", PackageNoFilter);
        >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
        OnAfterSetTrackingFiltersOnBeforeFindTrackingRecords(ItemTrackingFilters);
        <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

        Clear(ItemTrackingNavigateMgt);
        ItemTrackingNavigateMgt.FindTrackingRecords(ItemTrackingFilters);
        {...}
    end;
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    [IntegrationEvent(true, true)]
    local procedure OnAfterSetTrackingFiltersOnBeforeFindTrackingRecords(var ItemTrackingFilters: Record Item)
    begin
    end;
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

And we need more in codeunit 6529 "Item Tracking Navigate Mgt." in some of its functions but repeating the same pattern:

    local procedure FindItemLedgerEntry(var ItemFilters: Record Item)
    var
        IsHandled: Boolean;
    begin
        if not ItemLedgEntry.ReadPermission then
            exit;

        ItemLedgEntry.Reset();
        if ItemFilters.GetFilter("Lot No. Filter") <> '' then
            if ItemLedgEntry.SetCurrentKey("Lot No.") then;
        if ItemFilters.GetFilter("Package No. Filter") <> '' then
            if ItemLedgEntry.SetCurrentKey("Package No.") then;
        if ItemFilters.GetFilter("Serial No. Filter") <> '' then
            if ItemLedgEntry.SetCurrentKey("Serial No.") then;
        ItemLedgEntry.SetFilter("Lot No.", ItemFilters.GetFilter("Lot No. Filter"));
        ItemLedgEntry.SetFilter("Serial No.", ItemFilters.GetFilter("Serial No. Filter"));
        ItemLedgEntry.SetFilter("Package No.", ItemFilters.GetFilter("Package No. Filter"));
        ItemLedgEntry.SetFilter("Item No.", ItemFilters.GetFilter("No."));
        ItemLedgEntry.SetFilter("Variant Code", ItemFilters.GetFilter("Variant Filter"));
        >>>>>>>>>>>>>>>>>>>>>>>>>>>
        OnFindItemLedgerEntryOnAfterSetFilters(ItemLedgEntry, ItemFilters);
        <<<<<<<<<<<<<<<<<<<<<<<<<<<
        if ItemLedgEntry.FindSet() then
        {...}
    end;

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    [IntegrationEvent(false, false)]
    local procedure OnFindItemLedgerEntryOnAfterSetFilters(var ItemLedgEntry: Record "Item Ledger Entry"; var ItemFilters: Record Item)
    begin
    end;
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    local procedure FindReservEntry(var ItemFilters: Record Item)
    var
        IsHandled: Boolean;
    begin
        if not ReservEntry.ReadPermission then
            exit;

        ReservEntry.Reset();
        if ItemFilters.GetFilter("Lot No. Filter") <> '' then
            if ReservEntry.SetCurrentKey("Lot No.") then;
        if ItemFilters.GetFilter("Package No. Filter") <> '' then
            if ReservEntry.SetCurrentKey("Package No.") then;
        if ItemFilters.GetFilter("Serial No. Filter") <> '' then
            if ReservEntry.SetCurrentKey("Serial No.") then;
        ReservEntry.SetFilter("Lot No.", ItemFilters.GetFilter("Lot No. Filter"));
        ReservEntry.SetFilter("Serial No.", ItemFilters.GetFilter("Serial No. Filter"));
        ReservEntry.SetFilter("Package No.", ItemFilters.GetFilter("Package No. Filter"));
        ReservEntry.SetFilter("Item No.", ItemFilters.GetFilter("No."));
        ReservEntry.SetFilter("Variant Code", ItemFilters.GetFilter("Variant Filter"));
        if ReservEntry.FindSet() then
        >>>>>>>>>>>>>>>>>>>>>>>>>>>
        OnFindReservEntryOnAfterSetFilters(ReservEntry, ItemFilters);
        <<<<<<<<<<<<<<<<<<<<<<<<<<<
        if ItemLedgEntry.FindSet() then
        {...}
    end;

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    [IntegrationEvent(false, false)]
    local procedure OnFindReservEntryOnAfterSetFilters(var ReservEntry: Record "Reservation Entry"; var ItemFilters: Record Item)
    begin
    end;
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

We need this same changes for the procedures:

FindWhseActivLine(ItemFilters);
FindRegWhseActivLine(ItemFilters);
FindWhseEntry(ItemFilters);
FindPostedInvtPutAwayLine(ItemFilters);
FindPostedInvtPickLine(ItemFilters);

Additional context

We need this to extend the navigate functionality by an additional custom field to filter

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