---
id: object/codeunit/5341
type: object
title: Codeunit 5341 "CRM Int. Table. Subscriber"
summary: Codeunit 5341 "CRM Int. Table. Subscriber" in Base Application (Microsoft.Integration.D365Sales). 3 public procedures, 12 events, 23 event subscribers. Present since at least BC23, still in BC30, changed in BC24-28.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "28"
  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: 235c510f670802269b9a941db1788fbb9ad5e280781cdc982f2f77972fba15ba
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Integration/D365Sales/CRMIntTableSubscriber.Codeunit.al
    title: src/Layers/W1/BaseApp/Integration/D365Sales/CRMIntTableSubscriber.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: 5341
name: CRM Int. Table. Subscriber
namespace: Microsoft.Integration.D365Sales
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"
  - "27"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 138
  events: 12
  subscribers: 23
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 2
  calls: 17
  called_by: 2
  implements: 0
---

# Codeunit 5341 "CRM Int. Table. Subscriber"

> Codeunit 5341 "CRM Int. Table. Subscriber" in Base Application (Microsoft.Integration.D365Sales). 3 public procedures, 12 events, 23 event subscribers. Present since at least BC23, still in BC30, changed in BC24-28.

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

## Properties

| Property | Value |
|---|---|
| SingleInstance | true |

## Events published

- `OnBeforeUpdateCRMInvoiceBeforeInsertRecord(SourceRecordRef: RecordRef; DestinationRecordRef: RecordRef; var IsHandled: Boolean)` (integration)
- `OnCheckItemOrResourceIsNotBlockedOnAfterSalesInvLineLoop(SalesInvLine: Record "Sales Invoice Line")` (integration)
- `OnFindNewValueForCoupledRecordPK(IntegrationTableMapping: Record "Integration Table Mapping"; SourceFieldRef: FieldRef; DestinationFieldRef: FieldRef; var NewValue: Variant; var IsValueFound: Boolean)` (integration)
  - subscribers: [Codeunit 6276 "Sust. Int. Table Subscriber"](../codeunit/6276.md) OnFindNewValueForCoupledRecordPK, [Codeunit 6610 "FS Int. Table Subscriber"](../codeunit/6610.md) OnFindNewValueForCoupledRecordPK
- `OnUpdateCRMProductAfterTransferRecordFieldsOnAfterCalcItemBlocked(SourceRecordRef: RecordRef; var Blocked: Boolean)` (integration)
- `OnBeforeGetSourceDestCodeOnAfterTransferRecordFields(var SourceRecordRef: RecordRef; var DestinationRecordRef: RecordRef; var AdditionalFieldsWereModified: Boolean; DestinationIsInserted: Boolean; var IsHandled: Boolean)` (integration)
- `OnHandleOnBeforeIgnoreUnchangedRecordHandled(SourceRecordRef: RecordRef; DestinationRecordRef: RecordRef; var IsHandled: Boolean)` (integration)
- `OnChangeSalesOrderStatusOnBeforeCompareStatus(var SalesHeader: Record "Sales Header"; var NewSalesDocumentStatus: Enum "Sales Document Status")` (integration)
- `OnUpdateCRMInvoiceBeforeInsertRecordOnBeforeDestinationRecordRefGetTable(var CRMInvoice: Record "CRM Invoice"; SalesInvoiceHeader: Record "Sales Invoice Header")` (integration)
- `OnApplySalesLineTaxOnBeforeSetTax(var CRMSalesorderdetail: Record "CRM Salesorderdetail"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean)` (integration)
- `OnAfterArchSalesDocumentNoConfirm(var QuoteSalesHeader: Record "Sales Header")` (integration)
- `OnBeforeFindQuoteSalesHeader(var QuoteSalesHeader: Record "Sales Header")` (integration)
- `OnAfterHandlePostFilterIgnoreRecord(SourceRecordRef: RecordRef; var IgnoreRecord: Boolean)` (integration)

## Event subscriptions

- OnAfterJobQueueEntryRun subscribes to Codeunit "Job Queue Start Codeunit" OnAfterRun
- DeleteCouplingOnAfterDeleteAfterPosting subscribes to Codeunit "Sales-Post" OnAfterDeleteAfterPosting
- OnFindingIfJobNeedsToBeRun subscribes to Table "Job Queue Entry" OnFindingIfJobNeedsToBeRun
- OnShowDetailedLog subscribes to Page "Job Queue Log Entries" OnShowDetails
- OnCleanupAfterJobExecution subscribes to Table "Job Queue Entry" OnAfterDeleteEvent
- OnBeforeTransferRecordFields subscribes to Codeunit "Integration Rec. Synch. Invoke" OnBeforeTransferRecordFields
- OnTransferFieldData subscribes to Codeunit "Integration Record Synch." OnTransferFieldData
- OnAfterTransferRecordFields subscribes to Codeunit "Integration Rec. Synch. Invoke" OnAfterTransferRecordFields
- OnBeforeInsertRecord subscribes to Codeunit "Integration Rec. Synch. Invoke" OnBeforeInsertRecord
- OnAfterInsertRecord subscribes to Codeunit "Integration Rec. Synch. Invoke" OnAfterInsertRecord
- OnBeforeModifyRecord subscribes to Codeunit "Integration Rec. Synch. Invoke" OnBeforeModifyRecord
- OnAfterModifyRecord subscribes to Codeunit "Integration Rec. Synch. Invoke" OnAfterModifyRecord
- OnAfterUnchangedRecordHandled subscribes to Codeunit "Integration Rec. Synch. Invoke" OnAfterUnchangedRecordHandled
- OnBeforeIgnoreUnchangedRecordHandled subscribes to Codeunit "Integration Rec. Synch. Invoke" OnBeforeIgnoreUnchangedRecordHandled
- OnQueryPostFilterIgnoreRecord subscribes to Codeunit "CRM Integration Table Synch." OnQueryPostFilterIgnoreRecord
- OnFindUncoupledDestinationRecord subscribes to Codeunit "Integration Rec. Synch. Invoke" OnFindUncoupledDestinationRecord
- OnAfterDeleteIntegrationTableMapping subscribes to Table "Integration Table Mapping" OnAfterDeleteEvent
- LogTelemetryOnAfterInitSynchJob subscribes to Codeunit "Integration Table Synch." OnAfterInitSynchJob
- HandleOnAfterUncoupleRecord subscribes to Codeunit "Int. Rec. Uncouple Invoke" OnAfterUncoupleRecord
- HandleOnAfterDeleteAfterPosting subscribes to Table "Sales Header" OnAfterDeleteEvent
- HandleOnIsCRMIntegrationRecord subscribes to Codeunit "CRM Integration Management" OnIsCRMIntegrationRecord
- HandleOnIsIntegrationRecordChild subscribes to Codeunit "CRM Integration Management" OnIsIntegrationRecordChild
- HandleOnBeforeSetMatchingFilter subscribes to Codeunit "CDS Int. Table Couple" OnBeforeSetMatchingFilter

## Procedures

- `ClearCache()`
- `MarkArchivedSalesOrder(SalesHeader: Record "Sales Header")`
- `SetDocOccurenceNumber(var CRMSalesorder: Record "CRM Salesorder"; var SalesHeader: Record "Sales Header")`

Plus 100 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 5342 "CRM Synch. Helper"](../codeunit/5342.md) (70 calls: `CheckCustPriceGroupForSync → FindNAVLocalCurrencyInCRM`, `CheckCustPriceGroupForSync → GetCRMTransactioncurrency`, `CheckPriceListHeaderForSync → FindNAVLocalCurrencyInCRM`, …)
- [Codeunit 5330 "CRM Integration Management"](../codeunit/5330.md) (21 calls: `ChangeSalesOrderStateCode → IsCRMIntegrationEnabled`, `FindCRMUoMIdForSalesPrice → IsUnitGroupMappingEnabled`, `HandleContactQueryPostFilterIgnoreRecord → IsCDSIntegrationEnabled`, …)
- [Codeunit 7201 "CDS Integration Impl."](../codeunit/7201.md) (12 calls: `OnFindingIfJobNeedsToBeRun → IsIntegrationEnabled`, `OnFindingIfJobNeedsToBeRun → RegisterConnection`, `OnFindingIfJobNeedsToBeRun → UnregisterConnection`, …)
- [Codeunit 5344 "CRM Product Name"](../codeunit/5344.md) (9 calls: `CheckCRMUoMScheduleAfterTransferRecordFields → CDSServiceName`, `FindNewValueForCoupledRecordPK → CDSServiceName`, `InitializeCRMInvoiceLineWithProductDetails → CDSServiceName`, …)
- [Codeunit 5340 "CRM Integration Table Synch."](../codeunit/5340.md) (8 calls: `CoupleAndSyncUnitGroup → SynchRecordsToIntegrationTable`, `CreateUnitGroupAndItemUnitOfMeasure → SynchRecordsToIntegrationTable`, `CreateUnitGroupAndResourceUnitOfMeasure → SynchRecordsToIntegrationTable`, …)
- [Codeunit 5343 "CRM Sales Order to Sales Order"](../codeunit/5343.md) (3 calls: `UpdateCRMInvoiceBeforeInsertRecord → GetCoupledCustomer`, `UpdateCRMInvoiceBeforeInsertRecord → GetCRMAccountOfCRMSalesOrder`, `UpdateCRMInvoiceBeforeInsertRecord → GetCRMSalesOrder`)
- [Codeunit 414 "Release Sales Document"](../codeunit/414.md) (2 calls: `ChangeValidateSalesOrderStatus → PerformManualRelease`, `ChangeValidateSalesOrderStatus → PerformManualReopen`)
- [Codeunit 8703 "Feature Telemetry"](../codeunit/8703.md) (2 calls: `LogTelemetryOnAfterInitSynchJob → LogUptake`, `LogTelemetryOnAfterInitSynchJob → LogUsage`)
- [Codeunit 441 "Prepayment Mgt."](../codeunit/441.md) (1 call: `SetSalesOrderStatus → TestSalesPrepayment`)
- [Codeunit 447 "Record Link Management"](../codeunit/447.md) (1 call: `CreateNote → WriteNote`)
- [Codeunit 5063 "ArchiveManagement"](../codeunit/5063.md) (1 call: `UpdateSalesOrderQuoteNo → ArchSalesDocumentNoConfirm`)
- [Codeunit 5346 "CRM Sales Document Posting Mgt"](../codeunit/5346.md) (1 call: `SubmitOrInvoiceSalesOrder → IsSalesOrderFullyInvoiced`)
- [Codeunit 56 "Sales - Calc Discount By Type"](../codeunit/56.md) (1 call: `ApplySalesOrderDiscounts → ApplyInvDiscBasedOnAmt`)
- [Codeunit 57 "Document Totals"](../codeunit/57.md) (1 call: `UpdateCRMInvoiceAfterInsertRecord → CalculatePostedSalesInvoiceTotals`)
- [Codeunit 7001 "Price Calculation Mgt."](../codeunit/7001.md) (1 call: `UpdateCRMSalesOrderPriceList → IsExtendedPriceCalculationEnabled`)
- [Codeunit 7205 "CDS Int. Table. Subscriber"](../codeunit/7205.md) (1 call: `OnBeforeInsertRecord → SetOwnerId`)
- [Page 5338 "Integration Synch. Job List"](../page/5338.md) (1 call: `OnShowDetailedLog → (object)`)

## Called by

- [Codeunit 5340 "CRM Integration Table Synch."](../codeunit/5340.md) (1 call: `ClearCache → ClearCache`)
- [Table 36 "Sales Header"](../table/36.md) (1 call: `OnDelete → MarkArchivedSalesOrder`)

## Across versions

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

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 Int. Table. Subscriber")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
