Skip to content

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

Open
Explorer986 wants to merge 1 commit into
mainfrom
private/kumarjatin/638785
Open

Show a message when an e-document file cannot be viewed or no data could be extracted#9796
Explorer986 wants to merge 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.

Guards View PDF and View extracted data so a document with no or corrupt file data shows a clear message instead of a runtime error. Fixes AB#638785.
@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
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant