---
id: object/codeunit/5331
type: object
title: Codeunit 5331 "CRM Coupling Management"
summary: Codeunit 5331 "CRM Coupling Management" in Base Application (Microsoft.Integration.Dataverse). 9 public procedures. Present since at least BC23, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: bd4ffa396e961166264a4ce52749c5425305c2ce07c5cebfe5095cbc448777f7
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Integration/Dataverse/CRMCouplingManagement.Codeunit.al
    title: src/Layers/W1/BaseApp/Integration/Dataverse/CRMCouplingManagement.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 5331
name: CRM Coupling Management
namespace: Microsoft.Integration.Dataverse
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 12
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 52
  implements: 0
---

# Codeunit 5331 "CRM Coupling Management"

> Codeunit 5331 "CRM Coupling Management" in Base Application (Microsoft.Integration.Dataverse). 9 public procedures. Present since at least BC23, still in BC30.

Base Application · Microsoft.Integration.Dataverse · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Integration/Dataverse/CRMCouplingManagement.Codeunit.al) · facts from BC29

## Procedures

- `IsRecordCoupledToCRM(RecordID: RecordID): Boolean`
- `IsRecordCoupledToNAV(CRMID: Guid; NAVTableID: Integer): Boolean`
- `DefineOptionMapping(RecordId: RecordID; var CRMOptionId: Integer; var CreateNew: Boolean; var Synchronize: Boolean; var Direction: Option): Boolean`
- `DefineCoupling(RecordID: RecordID; var CRMID: Guid; var CreateNew: Boolean; var Synchronize: Boolean; var Direction: Option): Boolean`
- `RemoveCoupling(var RecRef: RecordRef)`
- `RemoveCoupling(RecordID: RecordID)`
- `RemoveCoupling(TableID: Integer; CRMTableID: Integer; CRMID: Guid)`
- `RemoveCouplingWithTracking(RecordID: RecordID; var TempCRMIntegrationRecord: Record "CRM Integration Record" temporary)`
- `RemoveCouplingWithTracking(TableID: Integer; CRMTableID: Integer; CRMID: Guid; var TempCRMIntegrationRecord: Record "CRM Integration Record" temporary)`

Plus 3 local procedures.

## Triggers

OnRun

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 5330 "CRM Integration Management"](../codeunit/5330.md) (3 calls: `DefineOptionMapping → CreateOptionMapping`, `RemoveCoupling → RemoveCoupling`, `RemoveSingleCoupling → RemoveCoupling`)

## Called by

- [Codeunit 5330 "CRM Integration Management"](../codeunit/5330.md) (2 calls: `DefineCoupling → DefineCoupling`, `DefineOptionMapping → DefineOptionMapping`)
- [Codeunit 5343 "CRM Sales Order to Sales Order"](../codeunit/5343.md) (1 call: `CRMIsCoupledToValidRecord → IsRecordCoupledToNAV`)
- [Page 132 "Posted Sales Invoice"](../page/132.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 14 "Salespersons/Purchasers"](../page/14.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 143 "Posted Sales Invoices"](../page/143.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 209 "Units of Measure"](../page/209.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 21 "Customer Card"](../page/21.md) (1 call: `OnAfterGetCurrRecordFunc → IsRecordCoupledToCRM`)
- [Page 210 "Resource Units of Measure"](../page/210.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 22 "Customer List"](../page/22.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 26 "Vendor Card"](../page/26.md) (1 call: `OnAfterGetCurrRecordFunc → IsRecordCoupledToCRM`)
- [Page 27 "Vendor List"](../page/27.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 30 "Item Card"](../page/30.md) (1 call: `OnAfterGetCurrRecordFunc → IsRecordCoupledToCRM`)
- [Page 31 "Item List"](../page/31.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 42 "Sales Order"](../page/42.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 495 "Currency Card"](../page/495.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 5 "Currencies"](../page/5.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 5050 "Contact Card"](../page/5050.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 5052 "Contact List"](../page/5052.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 5116 "Salesperson/Purchaser Card"](../page/5116.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 5123 "Opportunity List"](../page/5123.md) (1 call: `OnAfterGetRecord → IsRecordCoupledToCRM`)
- [Page 5124 "Opportunity Card"](../page/5124.md) (1 call: `OnAfterGetRecord → IsRecordCoupledToCRM`)
- [Page 5340 "CRM Systemuser List"](../page/5340.md) (1 call: `LinkUsersToSalespersons → RemoveCoupling`)
- [Page 5400 "Item Unit Group List"](../page/5400.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 5403 "Resource Unit Group List"](../page/5403.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 5404 "Item Units of Measure"](../page/5404.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 6251 "Sust. ESG Reporting Names"](../page/6251.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 6252 "Sust. ESG Report. Aggregation"](../page/6252.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 6295 "Sust. ESG Reporting Lines"](../page/6295.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 6296 "Sust. ESG Reporting Units"](../page/6296.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 6297 "Sust. ESG Standards"](../page/6297.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 6298 "Sust. Posted ESG Report Lines"](../page/6298.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 6333 "Sust. ESG Requirement Concepts"](../page/6333.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 6344 "Sust. ESG Range Periods"](../page/6344.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 6345 "Sust. ESG Std. Requirements"](../page/6345.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 6346 "Sust. ESG Concepts"](../page/6346.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 7 "Customer Price Groups"](../page/7.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 7015 "Sales Price Lists"](../page/7015.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 7016 "Sales Price List"](../page/7016.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 7209 "CDS Couple Salespersons"](../page/7209.md) (1 call: `ScheduleSalespersonsCoupling → RemoveCoupling`)
- [Page 76 "Resource Card"](../page/76.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 77 "Resource List"](../page/77.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page 9305 "Sales Order List"](../page/9305.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page extension 6610 "FS Job Task Card"](../pageextension/6610.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page extension 6611 "FS Job Task Lines"](../pageextension/6611.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page extension 6612 "FS Resource Card"](../pageextension/6612.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page extension 6613 "FS Resource List"](../pageextension/6613.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page extension 6614 "FS Service Order"](../pageextension/6614.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page extension 6617 "FS Job Task List"](../pageextension/6617.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page extension 6623 "FS Location List"](../pageextension/6623.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- [Page extension 6624 "FS Service Orders"](../pageextension/6624.md) (1 call: `OnAfterGetCurrRecord → IsRecordCoupledToCRM`)
- and 2 more: data/code/graph/29/calls.json

## Across versions

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

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). The call sections above are our own, per object, from the BC29 call graph. 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: "CRM Coupling Management")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
