---
id: change/bcapps/9810
type: change
title: "#9810 [master]-Edit in Excel fails with false duplicate error when creating new Item Variants"
summary: Item Variants page no longer fails with a false duplicate key error when creating new variants through Edit in Excel by limiting the forced record update to interactive clients only.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - page item variants
system: inventory
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:10:40.148Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: c2fe0b1f80f24884e2c020ba6fb5769f21b8bf85
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9810
    title: "microsoft/BCApps#9810: [master]-Edit in Excel fails with false duplicate error when creating new Item Variants"
    date: "2026-07-31"
    commit: c2fe0b1f80f24884e2c020ba6fb5769f21b8bf85
    t: null
    quote: Scope the forced update so it runs only for interactive clients and is skipped for OData/web-service sessions.
links:
  learn: []
  objects:
    - object/page/5401
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9810
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9810
kind: pr
base_branch: main
major: "30"
merged_at: "2026-07-31T13:25:01Z"
author: MSNehaNawal
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - From Fork
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 1
  additions: 4
  deletions: 1
  al: 1
apps:
  - Base Application
objects_touched:
  - key: page/5401
    page: page/5401
    type: page
    id: 5401
    name: Item Variants
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 644606
systems:
  - inventory
quote: Scope the forced update so it runs only for interactive clients and is skipped for OData/web-service sessions.
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #9810 [master]-Edit in Excel fails with false duplicate error when creating new Item Variants

> Item Variants page no longer fails with a false duplicate key error when creating new variants through Edit in Excel by limiting the forced record update to interactive clients only.

[Pull request](https://github.com/microsoft/BCApps/pull/9810) · merged into `main` (BC30) on 2026-07-31 by MSNehaNawal (community contribution) · 1 file (+4 -1), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Removed forced immediate record persistence that triggered during Edit in Excel operations
- Scoped the OnValidate trigger's CurrPage.Update(true) call to interactive sessions only
- OData and web service sessions now bypass the early update, preventing duplicate key conflicts
- Allows Edit in Excel to handle variant creation through its normal OData insert flow
- Behaviour changes for users or extensions.

## AL objects touched

- [Page 5401 "Item Variants"](../../objects/page/5401.md), Base Application: modified

## Context

- Work items: AB#644606
- Labels: ADO: Sync, From Fork, Team: SCM
- Systems: inventory
- From the description: "Scope the forced update so it runs only for interactive clients and is skipped for OData/web-service sessions."

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