---
id: object/table/5331
type: object
title: Table 5331 "CRM Integration Record"
summary: Table 5331 "CRM Integration Record" in Base Application (Microsoft.Integration.Dataverse). 13 fields, 40 public procedures, 2 events. Present since at least BC23, still in BC30, changed in BC24-26.
tier: official
language: en
tags:
  - table
  - base application
versions:
  introduced: null
  last_changed: "26"
  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: 33d6426ae94d56195f297e38e0fdf69c4ac5eac8320a4651cb17a183f451a1ef
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Integration/Dataverse/CRMIntegrationRecord.Table.al
    title: src/Layers/W1/BaseApp/Integration/Dataverse/CRMIntegrationRecord.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 5331
name: CRM Integration Record
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:
  - "24"
  - "25"
  - "26"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 13
  procedures: 53
  events: 2
  subscribers: 0
relations:
  out: 0
  referenced_by: 42
  pages: 0
  extended_by: 1
  event_subscribers: 0
  calls: 2
  called_by: 0
  implements: 0
---

# Table 5331 "CRM Integration Record"

> Table 5331 "CRM Integration Record" in Base Application (Microsoft.Integration.Dataverse). 13 fields, 40 public procedures, 2 events. Present since at least BC23, still in BC30, changed in BC24-26.

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

## Properties

| Property | Value |
|---|---|
| Caption | CRM Integration Record |
| DataClassification | CustomerContent |

## Fields

Explanation: the field's ToolTip in the code; without one, the ToolTip of a page control bound to the field (marked via the page); without that, its Caption (marked caption) when that differs from the name.

| No. | Name | Type | Explanation | Notes |
|---|---|---|---|---|
| 2 | CRM ID | Guid | — |  |
| 3 | Integration ID | Guid | — |  |
| 4 | Last Synch. Modified On | DateTime | — |  |
| 5 | Last Synch. CRM Modified On | DateTime | — |  |
| 6 | Table ID | Integer | — | not editable |
| 7 | Last Synch. Result | Option | — | OptionCaption: ,Success,Failure |
| 8 | Last Synch. CRM Result | Option | — | OptionCaption: ,Success,Failure |
| 9 | Last Synch. Job ID | Guid | — |  |
| 10 | Last Synch. CRM Job ID | Guid | — |  |
| 11 | Skipped | Boolean | — | not editable |
| 13 | Statistics Uploaded | Boolean | — |  |
| 14 | Archived Sales Order | Boolean | — | not editable |
| 15 | Archived Sales Order Updated | Boolean | — | not editable |

## Keys

- Key1: CRM ID, Integration ID (clustered)
- Key2: Integration ID
- Key3: Last Synch. Modified On, Integration ID
- Key4: Last Synch. CRM Modified On, CRM ID
- Key5: Skipped, Table ID
- Key6: Table ID
- Key7: Statistics Uploaded, Skipped, Table ID
- Key8: Integration ID, Statistics Uploaded, Skipped, Table ID

## Events published

- `OnBeforeIsModifiedAfterLastSynchronizedCRMRecord(CRMID: Guid; DestinationTableID: Integer; CurrentModifiedOn: DateTime; var IsModified: Boolean; var Handled: Boolean)` (integration)
- `OnBeforeIsModifiedAfterLastSynchronizedRecord(RecordID: RecordID; CurrentModifiedOn: DateTime; var IsModified: Boolean; var Handled: Boolean)` (integration)

## Procedures

- `GetTableID(): Integer`
- `RepairTableIdByLocalRecord(): Boolean` (internal)
- `RepairTableIdByCRMRecord(): Boolean` (internal)
- `GetCRMRecordID(IntegrationTableID: Integer; var CRMRecID: RecordID): Boolean`
- `GetCRMRecordRef(IntegrationTableID: Integer; var RecRef: RecordRef): Boolean`
- `GetLatestJobIDFilter(): Text`
- `GetLatestError(var IntegrationSynchJobErrors: Record "Integration Synch. Job Errors"): Boolean`
- `InsertRecord(CRMID: Guid; SysId: Guid; TableId: Integer)`
- `IsCRMRecordRefCoupled(CRMRecordRef: RecordRef): Boolean`
- `IsIntegrationIdCoupled(IntegrationID: Guid; TableId: Integer): Boolean`
- `IsRecordCoupled(DestinationRecordID: RecordID): Boolean`
- `FindByCRMID(CRMID: Guid): Boolean`
- `FindValidByCRMID(CRMID: Guid): Boolean`
- `FindRecordId(var RecId: RecordId): Boolean`
- `FindSystemIdByRecordId(var SysId: Guid; RecId: RecordId): Boolean`
- `FindSystemIdByRecordRef(var SysId: Guid; RecordRef: RecordRef): Boolean`
- `FindByRecordID(RecID: RecordID): Boolean`
- `FindValidByRecordID(RecID: RecordID; IntegrationTableID: Integer): Boolean`
- `FindRecordIDFromID(SourceCRMID: Guid; DestinationTableID: Integer; var DestinationRecordId: RecordID): Boolean`
- `FindIDFromRecordID(SourceRecordID: RecordID; var DestinationCRMID: Guid): Boolean`
- `FindIDFromRecordRef(SourceRecordRef: RecordRef; var DestinationCRMID: Guid): Boolean`
- `CoupleCRMIDToRecordID(CRMID: Guid; RecordID: RecordID)`
- `CoupleCRMIDToRecordRef(CRMID: Guid; RecordRef: RecordRef)`
- `CoupleRecordIdToCRMID(RecordID: RecordID; CRMID: Guid)`
- `RemoveCouplingToRecord(RecordID: RecordID): Boolean`
- `RemoveCouplingToRecord(RecordRef: RecordRef): Boolean`
- `RemoveCouplingToCRMID(CRMID: Guid; DestinationTableID: Integer): Boolean`
- `SetNewCRMId(CRMId: Guid)`
- `SetNewIntegrationId(IntegrationId: Guid)`
- `AssertRecordIDCanBeCoupled(RecordID: RecordID; CRMID: Guid)`
- `SetLastSynchResultFailed(SourceRecRef: RecordRef; DirectionToIntTable: Boolean; JobId: Guid)`
- `SetLastSynchResultFailed(SourceRecRef: RecordRef; DirectionToIntTable: Boolean; JobId: Guid; var MarkedAsSkipped: Boolean)`
- `IsSkipped(SourceRecordRef: RecordRef; DirectionToIntTable: Boolean): Boolean`
- `SetLastSynchModifiedOns(SourceCRMID: Guid; DestinationTableID: Integer; CRMLastModifiedOn: DateTime; LastModifiedOn: DateTime; JobId: Guid; Direction: Option)`
- `SetLastSynchCRMModifiedOn(CRMID: Guid; DestinationTableID: Integer; CRMLastModifiedOn: DateTime)`
- `IsSameFailureRepeatedTwice(RecRef: RecordRef; LastJobID: Guid; NewJobID: Guid): Boolean`
- `IsModifiedAfterLastSynchonizedCRMRecord(CRMID: Guid; DestinationTableID: Integer; CurrentModifiedOn: DateTime): Boolean`
- `IsModifiedAfterLastSynchronizedRecord(RecordID: RecordID; CurrentModifiedOn: DateTime): Boolean`
- `IsModifiedAfterLastSynchronizedRecord(RecordRef: RecordRef; CurrentModifiedOn: DateTime): Boolean`
- `DeleteIfRecordDeleted(CRMID: Guid; DestinationTableID: Integer): Boolean`

Plus 11 local procedures.

## Triggers

OnInsert, OnDelete

## Referenced by

42 fields in 42 objects relate to this table (TableRelation or CalcFormula).

- [Table 1001 "Job Task"](../table/1001.md): Coupled to Dataverse
- [Table 112 "Sales Invoice Header"](../table/112.md): Coupled to Dataverse
- [Table 13 "Salesperson/Purchaser"](../table/13.md): Coupled to Dataverse
- [Table 1313 "Activities Cue"](../table/1313.md): Coupled Data Synch Errors
- [Table 156 "Resource"](../table/156.md): Coupled to Dataverse
- [Table 18 "Customer"](../table/18.md): Coupled to Dataverse
- [Table 204 "Unit of Measure"](../table/204.md): Coupled to Dataverse
- [Table 205 "Resource Unit of Measure"](../table/205.md): Coupled to Dataverse
- [Table 23 "Vendor"](../table/23.md): Coupled to Dataverse
- [Table 27 "Item"](../table/27.md): Coupled to Dataverse
- [Table 36 "Sales Header"](../table/36.md): Coupled to Dataverse
- [Table 4 "Currency"](../table/4.md): Coupled to Dataverse
- [Table 5050 "Contact"](../table/5050.md): Coupled to Dataverse
- [Table 5092 "Opportunity"](../table/5092.md): Coupled to Dataverse
- [Table 5335 "Integration Table Mapping"](../table/5335.md): No. of Skipped
- [Table 5358 "CDS Failed Option Mapping"](../table/5358.md): CRM Integration Record Id
- [Table 5400 "Unit Group"](../table/5400.md): Coupled to Dataverse
- [Table 5404 "Item Unit of Measure"](../table/5404.md): Coupled to Dataverse
- [Table 5940 "Service Item"](../table/5940.md): Coupled to Dataverse
- [Table 6 "Customer Price Group"](../table/6.md): Coupled to Dataverse
- [Table 6229 "Sust. ESG Reporting Name"](../table/6229.md): Coupled to Dataverse
- [Table 6230 "Sust. ESG Reporting Line"](../table/6230.md): Coupled to Dataverse
- [Table 6232 "Sust. Posted ESG Report Line"](../table/6232.md): Coupled to Dataverse
- [Table 6252 "Sust. ESG Reporting Unit"](../table/6252.md): Coupled to Dataverse
- [Table 6253 "Sust. ESG Standard"](../table/6253.md): Coupled to Dataverse
- [Table 6255 "Sust. ESG Range Period"](../table/6255.md): Coupled to Dataverse
- [Table 6256 "Sust. ESG Standard Requirement"](../table/6256.md): Coupled to Dataverse
- [Table 6257 "Sust. ESG Concept"](../table/6257.md): Coupled to Dataverse
- [Table 6258 "Sust. ESG Requirement Concept"](../table/6258.md): Coupled to Dataverse
- [Table 7002 "Sales Price"](../table/7002.md): Coupled to Dataverse
- [Table 9057 "Job Cue"](../table/9057.md): Coupled Data Synch Errors
- [Table 9059 "Administration Cue"](../table/9059.md): Coupled Data Synch Errors
- [Table 9062 "User Security Status"](../table/9062.md): Coupled Data Synch Errors
- [Table 9063 "Relationship Mgmt. Cue"](../table/9063.md): Coupled Data Synch Errors
- [Table extension 6611 "FS Job Task"](../tableextension/6611.md): Coupled to FS
- [Table extension 6612 "FS Service Item"](../tableextension/6612.md): Coupled to FS
- [Table extension 6613 "FS Job Cue"](../tableextension/6613.md): Coupled Data Sync Errors
- [Table extension 6614 "FS Location"](../tableextension/6614.md): Coupled to FS
- [Table extension 6615 "FS Service Header"](../tableextension/6615.md): Coupled to FS
- [Table extension 6616 "FS Service Line"](../tableextension/6616.md): Coupled to FS
- [Table extension 6619 "FS Service Order Type"](../tableextension/6619.md): Coupled to FS
- [Table extension 6620 "FS Service Item Line"](../tableextension/6620.md): Coupled to FS

## Extended by

- [Table extension 6618 "FS Integration Record"](../tableextension/6618.md)

## 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 10 "Type Helper"](../codeunit/10.md) (2 calls: `IsModifiedAfterLastSynchonizedCRMRecord → CompareDateTime`, `IsModifiedAfterLastSynchronizedRecord → CompareDateTime`)
- [Codeunit 5344 "CRM Product Name"](../codeunit/5344.md) (1 call: `AssertRecordIDCanBeCoupled → CDSServiceName`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-26

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: "table", object_name: "CRM Integration Record")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
