---
id: change/bcapps/14192
type: change
title: "#14192 Changed misleading logic of onedrive file creation to not always fallback to file already exists"
summary: OneDrive file creation logic was corrected to avoid always falling back to assuming the file already exists when creation attempts fail.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit document service management
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-12-05T01:02:38.263Z"
  flags: []
generated:
  at: "2026-12-05T00:13:03.967Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: d02bc71ac9e950bc41035eaa4805378b4405881b
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/14192
    title: "microsoft/BCApps#14192: Changed misleading logic of onedrive file creation to not always fallback to file already exists"
    date: "2026-12-04"
    commit: d02bc71ac9e950bc41035eaa4805378b4405881b
    t: null
    quote: Changed misleading OneDrive file creation logic that would always fallback to file already exists on every unsuccessful attempt of creating the file.
links:
  learn: []
  objects:
    - object/codeunit/9510
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-document-sharing-onedrive
      title: Extending Document Sharing and OneDrive for Business
      label: possibly related
      why: touches Codeunit 9510 "Document Service Management"
      by: code
number: 14192
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/14192
kind: pr
base_branch: main
major: "30"
merged_at: "2026-12-04T18:23:16Z"
author: Kimi310
author_type: User
community_contribution: false
labels:
  - "Team: Integrations"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 1
  additions: 10
  deletions: 4
  al: 1
apps:
  - Base Application
objects_touched:
  - key: codeunit/9510
    page: codeunit/9510
    type: codeunit
    id: 9510
    name: Document Service Management
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 641613
systems:
  - integration
quote: Changed misleading OneDrive file creation logic that would always fallback to file already exists on every unsuccessful attempt of creating the file.
joined_against:
  major: "30"
  commit: f53bb0f1ecd89fde9f133f9dcaf5bf43cf5f2671
---

# #14192 Changed misleading logic of onedrive file creation to not always fallback to file already exists

> OneDrive file creation logic was corrected to avoid always falling back to assuming the file already exists when creation attempts fail.

[Pull request](https://github.com/microsoft/BCApps/pull/14192) · merged into `main` (BC30) on 2026-12-04 by Kimi310 · 1 file (+10 -4), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Fixed misleading error handling in OneDrive file creation
- Changed fallback behavior to no longer assume file already exists on every failure
- Affects Document Service Management codeunit
- Improves accuracy of file creation status detection
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 9510 "Document Service Management"](../../objects/codeunit/9510.md), Base Application: modified

## Context

- Work items: AB#641613
- Labels: Team: Integrations
- Systems: integration
- From the description: "Changed misleading OneDrive file creation logic that would always fallback to file already exists on every unsuccessful attempt of creating the file."

## Possibly related

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

- [Extending Document Sharing and OneDrive for Business](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-document-sharing-onedrive) — possibly related: touches Codeunit 9510 "Document Service Management"

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