---
id: change/bcapps/13579
type: change
title: "#13579 Fix synchronization error event record context"
summary: The LogSynchError method in Integration Synch. Job Errors table now passes the newly inserted error record to the OnAfterLogSynchError event instead of the ambient record, allowing subscribers to receive the correct error data. Two regression tests were added to verify the fix.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - table integration synch. job errors
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-11-06T01:00:07.909Z"
  flags: []
generated:
  at: "2026-11-07T00:15:21.625Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 790e932cb42891bbea0434c11c3ffcbcd15f746c
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/13579
    title: "microsoft/BCApps#13579: Fix synchronization error event record context"
    date: "2026-11-05"
    commit: 790e932cb42891bbea0434c11c3ffcbcd15f746c
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/table/5339
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/admin-how-to-view-synchronization-status
      title: View the Status of Synchronization Jobs
      label: possibly related
      why: Documents synchronization errors page displaying status of coupled record synchronization jobs.
      by: model
number: 13579
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/13579
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-05T11:44:30Z"
author: JesperSchulz
author_type: User
community_contribution: false
labels:
  - "ADO: Sync"
  - "Team: Integrations"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 104
  deletions: 2
  al: 1
apps:
  - Base Application
objects_touched:
  - key: table/5339
    page: table/5339
    type: table
    id: 5339
    name: Integration Synch. Job Errors
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues:
  - 8041
work_items:
  - 657780
systems:
  - integration
quote: null
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #13579 Fix synchronization error event record context

> The LogSynchError method in Integration Synch. Job Errors table now passes the newly inserted error record to the OnAfterLogSynchError event instead of the ambient record, allowing subscribers to receive the correct error data. Two regression tests were added to verify the fix.

[Pull request](https://github.com/microsoft/BCApps/pull/13579) · merged into `main` (BC30) on 2026-11-05 by JesperSchulz · 2 files (+104 -2), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- LogSynchError passes the populated, inserted IntegrationSynchJobErrors record to OnAfterLogSynchError event
- Subscribers now receive the newly logged error instead of empty or unrelated caller record
- Two regression tests added covering empty and existing caller record contexts
- Tests verify event invocation, entry numbers, job/source/destination IDs, messages, timestamp, and exception details
- No new infrastructure or country-layer overrides required
- Behaviour changes for users or extensions.

## AL objects touched

- [Table 5339 "Integration Synch. Job Errors"](../../objects/table/5339.md), Base Application: modified

## Context

- Fixes: [#8041 [Bug]: table 5339 "Integration Synch. Job Errors" \| Integration Event OnAfterLogSynchError(Rec);](https://github.com/microsoft/BCApps/issues/8041) (closed)
- Work items: AB#657780
- Labels: ADO: Sync, Team: Integrations
- Systems: integration

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [View the Status of Synchronization Jobs](https://learn.microsoft.com/dynamics365/business-central/admin-how-to-view-synchronization-status) — possibly related: Documents synchronization errors page displaying status of coupled record synchronization jobs. (model-linked)

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