---
id: change/bcapps/10162
type: change
title: "#10162 Fix stale start status in e-document import pipeline"
summary: The e-document import pipeline now uses the initial processing status instead of the post-undo status for telemetry emission and event triggering, fixing an edge case where no telemetry or event was sent after undoing to unprocessed.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit e-doc. import
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:09:12.655Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 3d5f50ed43225f924ced20d61200455c62287309
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10162
    title: "microsoft/BCApps#10162: Fix stale start status in e-document import pipeline"
    date: "2026-08-13"
    commit: 3d5f50ed43225f924ced20d61200455c62287309
    t: null
    quote: Use the initial (pre-undo) processing status instead of the post-undo CurrentStatus for both the telemetry emit guard and the OnAfterProcessIncomingEDocument event.
links:
  learn: []
  objects:
    - object/codeunit/6140
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10162
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10162
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-13T08:37:27Z"
author: mynjj
author_type: User
community_contribution: false
labels:
  - "Team: Integrations"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 1
  additions: 4
  deletions: 3
  al: 1
apps:
  - EDocument
objects_touched:
  - key: codeunit/6140
    page: codeunit/6140
    type: codeunit
    id: 6140
    name: E-Doc. Import
    app: EDocument
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 646592
systems:
  - integration
quote: Use the initial (pre-undo) processing status instead of the post-undo CurrentStatus for both the telemetry emit guard and the OnAfterProcessIncomingEDocument event.
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10162 Fix stale start status in e-document import pipeline

> The e-document import pipeline now uses the initial processing status instead of the post-undo status for telemetry emission and event triggering, fixing an edge case where no telemetry or event was sent after undoing to unprocessed.

[Pull request](https://github.com/microsoft/BCApps/pull/10162) · merged into `main` (BC30) on 2026-08-13 by mynjj · 1 file (+4 -3), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Changed telemetry emit guard to use initial status before undo operations
- Modified OnAfterProcessIncomingEDocument event to use initial status instead of current status
- Fixes edge case where undoing to unprocessed state prevented telemetry and events from being emitted
- Improves code quality by maintaining consistent status usage
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 6140 "E-Doc. Import"](../../objects/codeunit/6140.md), EDocument: modified

## Context

- Work items: AB#646592
- Labels: Team: Integrations
- Systems: integration
- From the description: "Use the initial (pre-undo) processing status instead of the post-undo CurrentStatus for both the telemetry emit guard and the OnAfterProcessIncomingEDocument event."

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).
