microsoft / microsoft/BCApps

[Bug]: Navigate page cannot open Posted Direct Transfer documents

Open Beginner friendly
#11,008 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Team: SCM
Dominant language
AL
Stars
683
Forks
459
Avg merge
3d 26m
Merged PRs (30d)
633

Description

Describe the issue

Page 344 "Navigate" includes Posted Direct Transfer documents in the search results when a document number and posting date match a record in table "Direct Trans. Header". However, after the document is found, users cannot open it from Navigate. The document appears in the results, but drilling down or choosing "Show Related Entries" does not open the corresponding Posted Direct Transfer document. The issue seems to be that page 344 handles "Transfer Shipment Header" and "Transfer Receipt Header" in ShowRecords(), but does not handle "Direct Trans. Header".

Expected behavior

The Posted Direct Transfer document should be opened, similar to the behavior implemented for Posted Transfer Shipment and Posted Transfer Receipt documents.

Steps to reproduce
  1. Create and post a Direct Transfer.
  2. Open Navigate for the posted document.
  3. Verify that "Posted Direct Transfer" appears in the related entries list.
  4. Select the entry and choose "Show Related Entries" (or drill down).
Additional context

Technical analysis

FindDirectTransHeader() already adds Posted Direct Transfer documents to the Navigate results:

local procedure FindDirectTransHeader()
begin
    if (DocNoFilter = '') and (PostingDateFilter = '') then
        exit;

    if DirectTransHeader.ReadPermission() then begin
        DirectTransHeader.Reset();
        DirectTransHeader.SetFilter("No.", DocNoFilter);
        DirectTransHeader.SetFilter("Posting Date", PostingDateFilter);
        Rec.InsertIntoDocEntry(
            Database::"Direct Trans. Header",
            PostedDirectTransferTxt,
            DirectTransHeader.Count);
    end;
end;

However, ShowRecords() does not include handling for Database::"Direct Trans. Header" even though similar handling already exists for transfer shipments and transfer receipts:

case Rec."Table ID" of
    Database::"Transfer Shipment Header":
        if Rec."No. of Records" = 1 then
            PAGE.Run(PAGE::"Posted Transfer Shipment", TransShptHeader)
        else
            PAGE.Run(0, TransShptHeader);

    Database::"Transfer Receipt Header":
        if Rec."No. of Records" = 1 then
            PAGE.Run(PAGE::"Posted Transfer Receipt", TransRcptHeader)
        else
            PAGE.Run(0, TransRcptHeader);

    // Missing handling for Direct Transfers
    Database::"Direct Trans. Header":
        if Rec."No. of Records" = 1 then
            PAGE.Run(PAGE::"Posted Direct Transfer", DirectTransHeader)
        else
            PAGE.Run(0, DirectTransHeader);
end;

As a result, Navigate can find Posted Direct Transfer documents, but users cannot open them from the search results. The behavior should be consistent with Posted Transfer Shipment and Posted Transfer Receipt documents.

I will provide a fix for a bug
  • I will provide a fix for a bug

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at page 344's FindDirectTransHeader() and ShowRecords() procedures, then compare the existing Transfer Shipment Header and Transfer Receipt Header handling. Verify the Navigate flow with a posted Direct Transfer and confirm that selecting one result opens Posted Direct Transfer, while multiple results open the corresponding list.

Written by the indexing model from the issue text.

Assessment

Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
86/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.