Skip to content

Show a message when an e-document file cannot be viewed or no data could be extracted - #9796

Merged
Explorer986 merged 1 commit into
mainfrom
private/kumarjatin/638785
Jul 30, 2026
Merged

Show a message when an e-document file cannot be viewed or no data could be extracted#9796
Explorer986 merged 1 commit into
mainfrom
private/kumarjatin/638785

Conversation

@Explorer986

@Explorer986 Explorer986 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

What & why

When a Payables Agent e-document came from a file that is not a valid invoice, or a corrupt PDF, clicking View PDF or View extracted data threw a runtime error. This adds small guards so both actions show a clear message when there is nothing to display or the file cannot be read.

Linked work

Fixes AB#638785

How I validated this

  • I read the full diff and it contains only changes I intended.
  • I built the affected app(s) locally with no new analyzer warnings.
  • I ran the change in Business Central and confirmed it behaves as expected.
  • I added or updated tests for the new behavior, or explained below why none are needed.

What I tested and the outcome

  • Corrupt PDF: View PDF now shows "the file cannot be displayed" message instead of the client render error.
  • Valid non-invoice PDF: View extracted data shows a clear "no extracted data" message, and View PDF still opens the file.
  • Normal invoice: both views work as before.

Risk & compatibility

Low. Only adds guards and user messages on two view actions. No schema, data, or permission impact.

@Explorer986
Explorer986 requested review from a team July 28, 2026 12:38
@github-actions github-actions Bot added the AL: Apps (W1) Add-on apps for W1 label Jul 28, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Jul 28, 2026
@github-actions github-actions Bot added the Integration GitHub request for Integration area label Jul 29, 2026

@mynjj mynjj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See suggested changes.

Comment thread src/Apps/W1/EDocument/App/src/Document/EDocument.Table.al Outdated
@Explorer986
Explorer986 force-pushed the private/kumarjatin/638785 branch from edc0213 to 278ba7c Compare July 29, 2026 15:19
Comment thread src/Apps/W1/EDocument/App/src/Processing/EDocImport.Codeunit.al Outdated
Guards View extracted data so a document with no structured data shows a clear message instead of a runtime error. Fixes AB#638785.
@Explorer986
Explorer986 force-pushed the private/kumarjatin/638785 branch from 278ba7c to 81fd703 Compare July 29, 2026 15:31
@Explorer986
Explorer986 requested a review from mynjj July 29, 2026 15:37
@Explorer986
Explorer986 enabled auto-merge July 30, 2026 07:23
@Explorer986
Explorer986 added this pull request to the merge queue Jul 30, 2026
Merged via the queue into main with commit bb672c8 Jul 30, 2026
374 of 382 checks passed
@Explorer986
Explorer986 deleted the private/kumarjatin/638785 branch July 30, 2026 12:52
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 Integration GitHub request for Integration area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants