Skip to content

[E-document] Fix file actions for incoming and outgoing E-Documents - #11588

Open
Milica Đukić (djukicmilica) wants to merge 1 commit into
mainfrom
bugs/648718-view-file-outgoing-edocuments
Open

Milica Đukić (djukicmilica) wants to merge 1 commit into
mainfrom
bugs/648718-view-file-outgoing-edocuments

Conversation

@djukicmilica

@djukicmilica Milica Đukić (djukicmilica) commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Why

The View file action is available for outgoing E-Documents even though it reads the inbound-only unstructured source entry. This causes a raw record-not-found error and leaves users without a clear route to exported payloads.

Bug: https://dynamicssmb2.visualstudio.com/Dynamics%20SMB/_workitems/edit/648718

Summary

  • Clarified source-file preview as an incoming-only action with a friendly missing-file error.
  • Added outgoing access to exported files through E-Document logs filtered to the selected document.
  • Updated generic log navigation to retain the selected E-Document context.

Fixes
AB#648718

@github-actions github-actions Bot added AL: Apps (W1) Add-on apps for W1 Team: Integrations GitHub request for Integrations area labels Sep 17, 2026
@djukicmilica Milica Đukić (djukicmilica) changed the title Fix file actions for incoming and outgoing E-Documents [E-document] Fix file actions for incoming and outgoing E-Documents Sep 17, 2026
@github-actions github-actions Bot added this to the Version 30.0 milestone Sep 17, 2026
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 1

Recommendation: Accept with Suggestions

What this PR does

This change separates source-file preview from exported-file access. Incoming records only show source preview when an unstructured source entry exists, while outgoing records get a log-based exported-file path.

The code matches the reported failure: ViewSourceFile no longer raises a raw missing-record error when there is no source entry, and the pages route outgoing records to E-Document Logs filtered by entry number. The existing log page already enables export only when a log row has data storage, so the new actions use the existing export path instead of duplicating file handling.

Problem-solution fit

Fit: Strong

The bug is specifically about outgoing documents using an inbound-only source file field. The diff removes that action from invalid records, adds a clear error for direct calls, and exposes the existing log export path for outgoing documents.

Suggestions

S1 (🟠 Moderate): Add regression coverage for file actions
Please add a regression test for an outgoing E-Document with no source file and for the new exported-files route. This keeps the page visibility and friendly error behavior from regressing later.

Risk assessment and necessity

Risk: Low to moderate. The change is limited to E-Document pages and E-Document.ViewSourceFile; it changes page action visibility/navigation and one error path. No BaseApp publisher, posting flow, data migration, or public signature is changed, but users of the public table procedure will now receive a different, friendlier error for missing source files.

Necessity: The change is justified because outgoing E-Documents can otherwise show a misleading source-file action and fail with a low-level record error. The scope is targeted: it keeps incoming source preview, uses existing logs for exported files, and filters generic log navigation to the selected document.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=11588 round=1 by=alexei-dobriansky at=2026-09-17T22:13:15Z lastSha=7191b242c946f041e15a77f2d9adde3d3f4efb86 reviewKey=f17f7077b301367ce77f7d97114d1a878d7b373ff9f94ada3a83c3fe62e4fbab suggestions=S1@05af2073

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 Team: Integrations GitHub request for Integrations area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants