Codeunit 5350 CRM Statistics Job

Base Application, Microsoft.Integration.D365Sales

src/Layers/W1/BaseApp/Integration/D365Sales/CRMStatisticsJob.Codeunit.al16 procedures and triggers, in source order. Copyright (c) Microsoft Corporation. MIT

OnRun line 19, trigger

  1. 21callsUpdateStatisticsAndInvoices

UpdateStatisticsAndInvoices line 41, local

  1. 48callsCodeunit 5344 CRM Product Name FULL
  2. 51callsTable 5330 CRM Connection Setup RegisterConnectionWithName
  3. 53callsTable 5330 CRM Connection Setup GetDefaultCRMConnection
  4. 55callsUpdateAccountStatistics
  5. 57callsUpdateInvoices
  6. 59callsTable 5330 CRM Connection Setup UnregisterConnectionWithName

UpdateAccountStatistics line 62, local

  1. 77callsCodeunit 5335 Integration Table Synch. BeginIntegrationSynchJobLoging
  2. 80callsInitializeCustomerStatisticsSynchronizationTime
  3. 95callsUpdateCRMAccountStatisticsForCoupledCustomer
  4. 98callsCodeunit 5335 Integration Table Synch. LogSynchError
  5. 101writesTable 5331 CRM Integration Record Modify
  6. 104writesTable 5331 CRM Integration Record Modify
  7. 105callsCodeunit 5335 Integration Table Synch. IncrementSynchJobCounters
  8. 116callsAddCustomersWithLedgerEntryActivity
  9. 117callsAddCustomersWithLinesActivity
  10. 125callsUpdateCRMAccountStatisticsForCoupledCustomer
  11. 127callsCodeunit 5335 Integration Table Synch. LogSynchError
  12. 130writesTable 5331 CRM Integration Record Modify
  13. 134writesTable 5331 CRM Integration Record Modify
  14. 136callsCodeunit 5335 Integration Table Synch. IncrementSynchJobCounters
  15. 143writesTable 5328 CRM Synch Status Modify
  16. 149callsCodeunit 5335 Integration Table Synch. EndIntegrationSynchJobWithMsg
  17. 149callsGetAccStatsUpdateFinalMessage

InitializeCustomerStatisticsSynchronizationTime line 152, local

  1. 157callsCodeunit 5330 CRM Integration Management InitializeCRMSynchStatus
  2. 161writesTable 5328 CRM Synch Status Modify

AddCustomersWithLinesActivity line 181, local

  1. 195raisesOnAfterAddCustomersWithLinesActivity

UpdateInvoices line 198, local

  1. 204callsCodeunit 5335 Integration Table Synch. BeginIntegrationSynchJobLoging
  2. 207callsUpdateStatusOfPaidInvoices
  3. 208callsCodeunit 5335 Integration Table Synch. UpdateSynchJobCounters
  4. 210callsCodeunit 5335 Integration Table Synch. EndIntegrationSynchJobWithMsg
  5. 210callsGetInvStatusUpdateFinalMessage

UpdateCRMAccountStatisticsForCoupledCustomer line 213, local

  1. 224callsTable 5331 CRM Integration Record FindRecordId
  2. 232callsCreateOrUpdateCRMAccountStatistics

CreateOrUpdateCRMAccountStatistics line 242

  1. 250callsFindCRMAccountStatistics
  2. 259callsTable 18 Customer GetTotalAmountLCY
  3. 261callsTable 18 Customer CalcOverdueBalance
  4. 263callsTable 18 Customer GetSalesLCY
  5. 264callsTable 18 Customer GetInvoicedPrepmtAmountLCY
  6. 265callsCodeunit 5342 CRM Synch. Helper FindNAVLocalCurrencyInCRM
  7. 266raisesOnCreateOrUpdateCRMAccountStatisticsOnBeforeModify
  8. 268writesTable 5367 CRM Account Statistics Modify
  9. 271callsIsCRMAccountStatisticsModified
  10. 272writesTable 5367 CRM Account Statistics Modify

InitCRMAccountStatistics line 308, local

  1. 325writesTable 5367 CRM Account Statistics Insert

FindCRMAccountStatistics line 328, local

  1. 331callsInitCRMAccountStatistics
  2. 333callsModifyCRMAccount

ModifyCRMAccount line 338, local

  1. 342callsTable 5331 CRM Integration Record IsModifiedAfterLastSynchonizedCRMRecord
  2. 343writesTable 5341 CRM Account Modify
  3. 344callsTable 5331 CRM Integration Record SetLastSynchCRMModifiedOn
  4. 346writesTable 5341 CRM Account Modify

UpdateStatusOfPaidInvoices line 349

  1. 358callsCodeunit 5330 CRM Integration Management InitializeCRMSynchStatus
  2. 369callsUpdateInvoice
  3. 373callsUpdateInvoice
  4. 376callsTable 5328 CRM Synch Status UpdateLastUpdateInvoiceEntryNo

UpdateInvoice line 382, local

  1. 394callsTable 5331 CRM Integration Record FindByRecordID
  2. 395callsTryGetCRMInvoice
  3. 397callsCodeunit 5342 CRM Synch. Helper CancelCRMInvoice
  4. 399callsCodeunit 5342 CRM Synch. Helper UpdateCRMInvoiceStatusFromEntry

TryGetCRMInvoice line 402, local

  1. 407callsGetCRMInvoice

DeleteAccountStatisticsOnAfterUncoupleRecord line 438, local

  1. 450callsTryDeleteAccountStatistics

TryDeleteAccountStatistics line 455, local

  1. 461writesTable 5367 CRM Account Statistics Delete