---
id: object/codeunit/5871-fr
type: object
title: Codeunit 5871 "Upgrade Derogatory Linkage" (FR)
summary: Codeunit 5871 "Upgrade Derogatory Linkage" (FR) in the FR country layer (Microsoft.FixedAssets.Depreciation). 6 public procedures. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - fr layer
versions:
  introduced: "29"
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-11-24T00:56:51.308Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: a874c09dea3f1f071090f90025f65ff253c17901266ec17bfcd33d7ed934c33d
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/b42f520c380a64062ca700b5f5450acc436e5b05/src/Layers/FR/BaseApp/FixedAssets/Depreciation/UpgradeDerogatoryLinkage.Codeunit.al
    title: src/Layers/FR/BaseApp/FixedAssets/Depreciation/UpgradeDerogatoryLinkage.Codeunit.al (releases/29.x)
    date: null
    commit: b42f520c380a64062ca700b5f5450acc436e5b05
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/fr
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/12160
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/LocalFunctionality/France/how-to-set-up-accelerated-depreciation
      title: Set Up Accelerated Depreciation
      label: possibly related
      why: Documents setup of accelerated depreciation including derogatory linkage in France.
      by: model
object_type: codeunit
object_id: 5871
name: Upgrade Derogatory Linkage
namespace: Microsoft.FixedAssets.Depreciation
app: Base Application
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
country: FR
counts:
  fields: 0
  procedures: 37
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
---

# Codeunit 5871 "Upgrade Derogatory Linkage" (FR)

> Codeunit 5871 "Upgrade Derogatory Linkage" (FR) in the FR country layer (Microsoft.FixedAssets.Depreciation). 6 public procedures. Introduced in BC29, still in BC30.

FR country layer · Microsoft.FixedAssets.Depreciation · BC29-30 · [source at b42f520c](https://github.com/microsoft/BCApps/blob/b42f520c380a64062ca700b5f5450acc436e5b05/src/Layers/FR/BaseApp/FixedAssets/Depreciation/UpgradeDerogatoryLinkage.Codeunit.al) · facts from BC29

An object of the [FR localization](../../localizations/fr.md), not part of W1.

## Properties

| Property | Value |
|---|---|
| Access | Internal |
| Subtype | Upgrade |
| Permissions | tabledata "FA Ledger Entry" = rm, tabledata "Maintenance Ledger Entry" = rm |

## Procedures

- `RunStandaloneUpgrade()` (internal)
- `RunAfterRelationshipTransfer(ForceCorrective: Boolean)`: Links existing French derogatory FA and maintenance ledger entries after depreciation book relationships have been copied. Uniqueness is checked in both directions before links are created, making the result independent of processing order without retaining every matching pair. If no relationship is...
- `RunCorrectiveUpgrade()` (internal): Runs the corrective upgrade once for each company. Historical links and ambiguity markers for configured depreciation book relationships are cleared and rebuilt, while newer links and links to former source books are kept. The work stays in the caller's transaction so a failure also rolls back the e...
- `ClearAndRelinkConfiguredRelationshipPairs()` (internal): Clears historical links for configured depreciation book relationships, validates the relationships, rebuilds the links, and sets the corrective upgrade tag in the caller's transaction.
- `LinkFALedgerEntries(var LinkedCount: Integer; var AmbiguousCount: Integer; var MissingCount: Integer)` (internal)
- `LinkMaintenanceLedgerEntries(var LinkedCount: Integer; var AmbiguousCount: Integer; var MissingCount: Integer)` (internal)

Plus 31 local procedures.

## Triggers

OnUpgradePerCompany

## Recent changes

- 2026-10-20 [#12160 Deliverable 617319: Move French accelerated depreciation to W1 base application](../../changes/bcapps/12160.md) (main, BC30, feature, added)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

## Possibly related

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

- [Set Up Accelerated Depreciation](https://learn.microsoft.com/dynamics365/business-central/LocalFunctionality/France/how-to-set-up-accelerated-depreciation) — possibly related: Documents setup of accelerated depreciation including derogatory linkage in France. (model-linked)

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Upgrade Derogatory Linkage")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.

A FR country object, not part of W1: the default corpus does not have it; `bcatlas_list_countries` shows which countries the atlas has.
