---
title: "Codeunit 5342 CRM Synch. Helper"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/5342-crm-synch-helper/
type: codeunit
id: 5342
name: "CRM Synch. Helper"
app: "Base Application"
namespace: Microsoft.Integration.Dataverse
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/5342-crm-synch-helper/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 5342 CRM Synch. Helper

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/5342-crm-synch-helper/

| | |
| --- | --- |
| App | Base Application |
| Namespace | Microsoft.Integration.Dataverse |
| Versions | 17-28 |
| Source file | Integration/D365Sales/CRMSynchHelper.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| ClearCache | () | - | public | 17-28 | - | - |
| GetDefaultNAVPriceListName | () | Text[50] | public | 17 | Pending 15.2 | Use GetDefaultPriceListName instead |
| GetDefaultPriceListName | () | Text[100] | public | 17-28 | - | - |
| CreateCRMPricelevelInCurrency | (var Record CRM Pricelevel, Code[10], Decimal) | - | public | 17-28 | - | - |
| CreateCRMProductpriceIfAbsent | (Record CRM Invoicedetail) | - | public | 17-28 | - | - |
| FindCRMDefaultPriceList | (var Record CRM Pricelevel) | - | public | 17-28 | - | - |
| FindCRMPriceListByCurrencyCode | (var Record CRM Pricelevel, Code[10]) | Boolean | public | 17-28 | - | - |
| FindCRMProductPriceFromCRMInvoicedetail | (Record CRM Invoicedetail) | Boolean | public | 17-28 | - | - |
| FindNAVLocalCurrencyInCRM | (var Record CRM Transactioncurrency) | Guid | public | 17-28 | - | - |
| GetBaseCurrencyPrecision | () | Decimal | public | 17-28 | - | - |
| GetCRMCurrencyDefaultPrecision | () | Integer | public | 17-28 | - | - |
| GetCRMLCYToFCYExchangeRate | (Text[10]) | Decimal | public | 17-28 | - | - |
| GetFCYtoFCYExchangeRate | (Code[10], Code[10]) | Decimal | public | 17-28 | - | - |
| GetUnitGroupName | (Text) | Text[200] | public | 17-28 | - | - |
| GetUnitOfMeasureName | (RecordRef) | Text[100] | public | 17-28 | - | - |
| SetCRMDecimalsSupportedValue | (var Record CRM Product) | - | public | 17-28 | - | - |
| SetCRMDefaultPriceListOnProduct | (var Record CRM Product) | Boolean | public | 17-28 | - | - |
| SetCRMProductStateToActive | (var Record CRM Product) | - | public | 17-28 | - | - |
| SetCRMProductStateToRetired | (var Record CRM Product) | - | public | 17-28 | - | - |
| SetContactParentCompany | (Guid, RecordRef) | Boolean | public | 17-28 | - | - |
| SynchRecordIfMappingExists | (Integer, Integer, Variant) | Boolean | public | 17-28 | - | - |
| SynchRecordIfMappingExists | (Integer, Integer, Variant, var Boolean) | Boolean | public | 17-28 | - | - |
| SynchRecordIfMappingExists | (Integer, Variant, var Boolean) | Boolean | public | 17-20 | Pending 18.0 | Use another implementation of SynchRecordIfMappingExists |
| UpdateCRMCurrencyIdIfChanged | (Text, var FieldRef) | Boolean | public | 17-28 | - | - |
| UpdateCRMInvoiceStatus | (var Record CRM Invoice, Record Sales Invoice Header) | - | public | 17-28 | - | - |
| UpdateCRMInvoiceStatusFromEntry | (var Record CRM Invoice, Record Cust. Ledger Entry) | Integer | public | 17-28 | - | - |
| UpdateCRMPriceListItem | (var Record CRM Product) | Boolean | public | 17-28 | - | - |
| UpdateCRMProductPriceIfNegative | (var Record CRM Product) | Boolean | public | 17-28 | - | - |
| UpdateCRMProductQuantityOnHandIfNegative | (var Record CRM Product) | Boolean | public | 17-28 | - | - |
| UpdateCRMProductTypeCodeIfChanged | (var Record CRM Product, Integer) | Boolean | public | 17-28 | - | - |
| UpdateCRMProductStateCodeIfChanged | (var Record CRM Product, Boolean) | Boolean | public | 17-28 | - | - |
| UpdateItemBlockedIfChanged | (var Record Item, Boolean) | Boolean | public | 17-28 | - | - |
| UpdateResourceBlockedIfChanged | (var Record Resource, Boolean) | Boolean | public | 17-28 | - | - |
| UpdateCRMProductUoMFieldsIfChanged | (var Record CRM Product, Code[10]) | Boolean | public | 17-28 | - | - |
| UpdateCRMProductVendorNameIfChanged | (var Record CRM Product) | Boolean | public | 17-28 | - | - |
| UpdateOwnerIfChanged | (RecordRef, RecordRef, Integer, Integer, Integer, Option) | Boolean | public | 17-28 | - | - |
| UpdateContactOnModifyCustomer | (RecordRef) | - | public | 17-28 | - | - |
| UpdateContactOnModifyVendor | (RecordRef) | - | public | 17-28 | - | - |
| FindContactRelatedCustomer | (RecordRef, var Record Contact Business Relation) | Boolean | public | 17-28 | - | - |
| FindContactRelatedVendor | (RecordRef, var Record Contact Business Relation) | Boolean | public | 17-28 | - | - |
| UpdateSalesPersonCodeIfChanged | (RecordRef, var RecordRef, Integer, Integer, Option, Integer) | Boolean | public | 17-28 | - | - |
| UpdateFieldRefValueIfChanged | (var FieldRef, Text) | Boolean | public | 17-28 | - | - |
| GetValidCRMUnitOfMeasureRecords | (var Record CRM Uom, var Record CRM Uomschedule, Code[10]) | - | public | 17-28 | - | - |
| GetNavCurrencyCode | (Guid) | Code[10] | public | 17-28 | - | - |
| GetCRMTransactioncurrency | (Text) | Guid | public | 17-28 | - | - |
| SetSalesInvoiceHeaderCoupledToCRM | (Record Sales Invoice Header) | - | public | 17-21 | Pending 19.0 | Modify the code to get CRMIntegrationRecord out of SalesInvoiceHeader.RecordId, then call CRMIntegrationManagement.SetCoupledFlag |
| ShowPage | (RecordId) | - | public | 17-28 | - | - |
| FindNewValueForSpecialMapping | (FieldRef, var Variant) | Boolean | public | 17-28 | - | - |
| FindPKByRecordID | (RecordId, var Variant) | Boolean | public | 17-28 | - | - |
| FindRecordIDByPK | (Integer, Variant, var RecordId) | Boolean | public | 17-28 | - | - |
| FindSourceIntegrationTableMapping | (var Record Integration Table Mapping, FieldRef, FieldRef) | Boolean | public | 17-28 | - | - |
| IsClearValueOnFailedSync | (FieldRef, FieldRef) | Boolean | public | 17-28 | - | - |
| AreFieldsRelatedToMappedTables | (FieldRef, FieldRef, var Record Integration Table Mapping) | Boolean | public | 17-28 | - | - |
| ConvertTableToOption | (FieldRef, var Integer) | Boolean | public | 17-25 | Pending 20.0 | Use another implementation of ConvertTableToOption |
| ConvertOptionToTable | (FieldRef, FieldRef, var Text) | Boolean | public | 17-28 | - | - |
| UpdateCDSOptionMapping | (RecordId, RecordId) | - | public | 17-28 | - | - |
| FindOpportunityRelatedCustomer | (RecordRef, var Record Contact Business Relation) | Boolean | internal | 18-28 | - | - |
| IsContactBusinessRelationOptional | () | Boolean | internal | 18-28 | - | - |
| IsContactTypeCheckIgnored | () | Boolean | internal | 18-28 | - | - |
| UpdateCRMPriceListItems | (var Record CRM Product) | Boolean | public | 19-28 | - | - |
| UpdateCRMProductUomscheduleId | (var Record CRM Product, RecordRef) | Boolean | public | 19-28 | - | - |
| ConvertBaseUnitOfMeasureToUomId | (FieldRef, FieldRef, var Variant) | - | public | 19-28 | - | - |
| ConvertUomIdToBaseUnitOfMeasure | (FieldRef, FieldRef, var Variant) | - | public | 19-28 | - | - |
| ConvertTableToOption | (FieldRef, FieldRef, var Integer) | Boolean | public | 20-28 | - | - |
| CreateCRMProductpricelevelForProductAndUom | (Record CRM Product, Guid, Record CRM Uom) | - | public | 21-28 | - | - |
| GetCoupledCDSUserId | (RecordRef) | Guid | public | 21-28 | - | - |
| PrefixUnitGroupCode | (FieldRef, var Variant) | - | public | 21-28 | - | - |
| FindNewValueForSpecialMapping | (FieldRef, FieldRef, var Variant) | Boolean | internal | 21-28 | - | - |
| CreateCRMPriceList | (Record Sales Header, var Record CRM Pricelevel) | - | public | 22-28 | - | - |
| UpdateCRMPriceList | (Record Sales Header, Guid) | - | public | 22-28 | - | - |
| CancelCRMInvoice | (var Record CRM Invoice) | Integer | internal | 22-28 | - | - |
| UpdateCRMPriceListItemForUom | (var Record CRM Product, Record CRM Uom) | Boolean | public | 22-28 | - | - |
| TransformValue | (RecordRef, RecordRef, Record Transformation Rule, Integer, Integer) | - | public | 22-28 | - | - |
| FulfillSalesOrder | (Guid) | - | internal | 26-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAfterGetFieldRelation | (RecordRef, FieldRef, var Integer) | 17-28 | - | - |
| Integration event | OnGetCDSBaseCurrencyId | (var Guid, var Boolean) | 17-28 | - | - |
| Integration event | OnGetCDSOwnershipModel | (var Option, var Boolean) | 17-28 | - | - |
| Integration event | OnGetCDSBaseCurrencySymbol | (var Text[5], var Boolean) | 17-28 | - | - |
| Integration event | OnGetCDSBaseCurrencyPrecision | (var Integer, var Boolean) | 17-28 | - | - |
| Integration event | OnGetCDSCurrencyDecimalPrecision | (var Integer, var Boolean) | 17-28 | - | - |
| Integration event | OnGetVendorSyncEnabled | (var Boolean) | 17-28 | - | - |
| Integration event | OnGetIsContactBusinessRelationOptional | (var Boolean) | 18-28 | - | - |
| Integration event | OnGetIsContactTypeCheckIgnored | (var Boolean) | 18-28 | - | - |
| Integration event | OnFindAndSynchRecordIDFromIntegrationSystemId | (Guid, Integer, var RecordId, Boolean) | 22-23 | - | - |
| Integration event | OnUpdateCRMInvoiceStatusFromEntryOnBeforeModify | (var Record CRM Invoice, var Record CRM Invoice, Record Cust. Ledger Entry) | 22-28 | - | - |
| Integration event | OnUpdateCRMInvoiceStatusFromEntryOnBeforeCheckFieldsChanged | (var Record CRM Invoice, var Record CRM Invoice, Record Cust. Ledger Entry, var Boolean) | 22-28 | - | - |
| Integration event | OnBeforeCalculateActualStatusCode | (Record Cust. Ledger Entry, var Record CRM Invoice, var Boolean) | 22-28 | - | - |
| Integration event | OnConvertOptionToTableOnBeforeSetRangeForIntegrationFieldID | (var Record CRM Option Mapping, FieldRef, var Boolean) | 22-28 | - | - |
| Integration event | OnCancelCRMInvoiceOnBeforeModifyCRMInvoice | (var Record CRM Invoice, var Record CRM Invoice) | 22-28 | - | - |
| Integration event | OnCancelCRMInvoiceOnBeforeCheckFieldsChanged | (var Record CRM Invoice, var Record CRM Invoice, var Boolean) | 22-28 | - | - |
| Integration event | OnFindAndSynchRecordIDFromIntegrationSystemId | (Guid, Integer, var RecordId, var Boolean) | 24-28 | - | - |
| Integration event | OnBeforeFulfillSalesOrder | (var Guid) | 26-28 | - | - |
| Integration event | OnFailedFindContactByAccountId | (RecordRef, var Record Contact, Guid, var Boolean, var Boolean) | 27-28 | - | - |

## Source

Symbols: Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
