---
title: "Codeunit 5350 CRM Statistics Job"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/5350-crm-statistics-job/
type: codeunit
id: 5350
name: "CRM Statistics Job"
app: "Base Application"
namespace: Microsoft.Integration.D365Sales
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/5350-crm-statistics-job/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 5350 CRM Statistics Job

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/5350-crm-statistics-job/

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

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| CreateOrUpdateCRMAccountStatistics | (Record Customer, var Record CRM Account) | Integer | public | 17-28 | - | - |
| GetAccStatsUpdateFinalMessage | () | Text | public | 17-28 | - | - |
| GetInvStatusUpdateFinalMessage | () | Text | public | 17-28 | - | - |
| UpdateStatusOfPaidInvoices | (Code[20]) | Integer | public | 17-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAfterAddCustomersWithLinesActivity | (DateTime, var List) | 25-28 | - | - |
| Integration event | OnCreateOrUpdateCRMAccountStatisticsOnBeforeModify | (var Record CRM Account Statistics, var Record Customer) | 25-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.
