#10143 Handle non-invoice or currupt PDF extraction
E-document extraction now detects non-invoice or corrupt PDFs that return empty data and stops with a clear error, preventing creation of empty drafts and unnecessary vendor searches.
- 5files
- 4AL files
- 4objects
Pull request · merged into main (BC30) on 2026-08-17 by Explorer986 · 5 files (+207 -12), 4 AL · fix · tier official · reviewed (checked by Opus)
What changed
- Detects ADI responses that contain only empty values, such as from non-invoice, blank or corrupt PDFs
- Stops the structure step with a clear error instead of creating an empty draft
- No draft is saved and no vendor search runs after a failed extraction
- Valid header and line values are still kept and processed as before
- Tests added for detecting empty extraction responses
- Behaviour changes for users or extensions.
AL objects touched
- Codeunit 6121 “EDocument Json Helper”, EDocument: modified
- Codeunit 6406 “EDoc Prepare Purch. Draft”, EDocument: modified
- Codeunit 6174 “E-Document ADI Handler”, EDocument: modified
- Codeunit 6231 “E-Document MLLM Handler”, EDocument: modified
Context
- Work items: AB#634170
- Labels: AL: Apps (W1), Team: Integrations
- Systems: integration
Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).