Codeunit 6154 API Webhook Notification Send

Base Application, Microsoft.API.Webhooks

src/Layers/W1/BaseApp/System/API/Webhooks/APIWebhookNotificationSend.Codeunit.al62 procedures and triggers, in source order. Copyright (c) Microsoft Corporation. MIT

OnRun line 26, trigger

  1. 35callsIsApiSubscriptionEnabled
  2. 47callsCodeunit 6153 API Webhook Notification Mgt. CanScheduleJob
  3. 52callsInitialize
  4. 53callsDeleteExpiredSubscriptions
  5. 54callsDeleteObsoleteSubscriptions
  6. 55callsDeleteInactiveJobs
  7. 57callsGetActiveSubscriptions
  8. 65callsProcessNotifications
  9. 70callsDeleteObsoleteNotifications

Initialize line 198, local

  1. 201writesTable 2000000098 API Webhook Notification Aggr DeleteAll
  2. 206writesTable 2000000095 API Webhook Subscription DeleteAll
  3. 211writesTable 2000000096 API Webhook Notification DeleteAll

ProcessNotifications line 226, local

  1. 231callsDateTimeToString
  2. 232raisesOnBeforeProcessNotifications
  3. 233callsTransferAggregateNotificationsToBuffer
  4. 234callsGenerateAggregateNotifications
  5. 236callsSendNotifications
  6. 237callsUpdateTablesFromBuffer
  7. 239callsCodeunit 6153 API Webhook Notification Mgt. ScheduleJob
  8. 243callsDateTimeToString
  9. 243callsDateTimeToString
  10. 245raisesOnAfterProcessNotifications

SendNotifications line 248, local

  1. 261callsGetSubscriptionsPerNotificationUrl
  2. 262callsGetPayloadPerNotificationUrl
  3. 265callsSendNotification
  4. 266callsDeleteNotifications
  5. 269callsIncreaseAttemptNumber
  6. 271callsDeleteNotifications
  7. 272callsDeleteInvalidSubscriptions

GetPayloadPerNotificationUrl line 279, local

  1. 288callsCodeunit 5459 JSON Management InitializeEmptyCollection
  2. 289callsCodeunit 5459 JSON Management GetJsonArray
  3. 292callsAddPayloadPerSubscription
  4. 300callsFormatPayloadPerNotificationUrl

AddPayloadPerSubscription line 304, local

  1. 310callsGetSystemIdBySubscriptionId
  2. 318callsClearFiltersFromNotificationsBuffer
  3. 330callsGetEntityJObject
  4. 331callsCodeunit 5459 JSON Management AddJObjectToJArray
  5. 333callsChangeTypeToString
  6. 334callsDateTimeToString

FormatPayloadPerNotificationUrl line 344, local

  1. 355callsCodeunit 5459 JSON Management InitializeCollection
  2. 356callsCodeunit 5459 JSON Management GetJsonArray
  3. 357callsCodeunit 5459 JSON Management InitializeEmptyObject
  4. 358callsCodeunit 5459 JSON Management GetJSONObject
  5. 359callsCodeunit 5459 JSON Management AddJArrayToJObject
  6. 362callsCodeunit 5459 JSON Management InitializeEmptyObject
  7. 363callsCodeunit 5459 JSON Management GetJSONObject
  8. 364callsCodeunit 5459 JSON Management AddJPropertyToJObject
  9. 365callsCodeunit 5459 JSON Management AddJPropertyToJObject

TransferAggregateNotificationsToBuffer line 379, local

  1. 391writesTable 2000000098 API Webhook Notification Aggr Insert
  2. 392callsGetSystemIdBySubscriptionId
  3. 393callsChangeTypeToString
  4. 394callsDateTimeToString
  5. 396callsDateTimeToString

GenerateAggregateNotifications line 403, local

  1. 410callsClearFiltersFromNotificationsBuffer
  2. 413callsCollectFirstModifiedTimeForPendingCollectionNotifications
  3. 416callsGetPendingNotifications
  4. 418callsIsNullUpdate
  5. 420callsGenerateAggregateNotification

GenerateAggregateNotification line 432, local

  1. 436callsGetSystemIdBySubscriptionId
  2. 437callsChangeTypeToString
  3. 437callsDateTimeToString
  4. 439callsClearFiltersFromNotificationsBuffer
  5. 443callsMergeIntoExistingCollectionAggregateNotification
  6. 448callsMergeIntoExistingUpdatedAggregateNotification
  7. 452callsGenerateSingleAggregateNotification
  8. 455callsMergeAllIntoNewCollectionAggregateNotification

CollectFirstModifiedTimeForPendingCollectionNotifications line 458, local

  1. 462callsClearFiltersFromNotificationsBuffer
  2. 471callsCollectFirstModifiedTimeBySubscriptionId

MergeIntoExistingCollectionAggregateNotification line 478, local

  1. 489callsGetSystemIdBySubscriptionId
  2. 491callsChangeTypeToString
  3. 491callsDateTimeToString
  4. 493callsClearFiltersFromNotificationsBuffer
  5. 507callsGetLastNotification
  6. 510writesTable 2000000098 API Webhook Notification Aggr Modify(true)
  7. 515callsChangeTypeToString
  8. 517writesTable 2000000098 API Webhook Notification Aggr Modify(true)
  9. 523callsHasNotificationOnDelete
  10. 528writesTable 2000000098 API Webhook Notification Aggr Modify(true)
  11. 539writesTable 2000000098 API Webhook Notification Aggr Insert
  12. 541callsChangeTypeToString
  13. 542callsDateTimeToString
  14. 544callsDateTimeToString
  15. 550writesTable 2000000098 API Webhook Notification Aggr DeleteAll
  16. 554callsDateTimeToString
  17. 554callsDateTimeToString
  18. 556callsCollectFirstModifiedTimeBySubscriptionId

MergeIntoExistingUpdatedAggregateNotification line 560, local

  1. 562callsClearFiltersFromNotificationsBuffer
  2. 567callsGetSystemIdBySubscriptionId
  3. 567callsDateTimeToString
  4. 570writesTable 2000000098 API Webhook Notification Aggr Modify(true)

GenerateSingleAggregateNotification line 576, local

  1. 581callsClearFiltersFromNotificationsBuffer
  2. 584callsGetMaxNumberOfNotifications
  3. 588callsGetSystemIdBySubscriptionId
  4. 589callsChangeTypeToString
  5. 590callsDateTimeToString
  6. 593writesTable 2000000098 API Webhook Notification Aggr Insert
  7. 595callsChangeTypeToString
  8. 596callsDateTimeToString
  9. 598callsDateTimeToString

MergeAllIntoNewCollectionAggregateNotification line 603, local

  1. 611callsGetSystemIdBySubscriptionId
  2. 613callsDateTimeToString
  3. 614callsClearFiltersFromNotificationsBuffer
  4. 625callsHasNotificationOnDelete
  5. 629writesTable 2000000098 API Webhook Notification Aggr Modify(true)
  6. 634callsDateTimeToString
  7. 634callsDateTimeToString
  8. 636callsCollectFirstModifiedTimeBySubscriptionId
  9. 638callsClearFiltersFromNotificationsBuffer
  10. 641writesTable 2000000098 API Webhook Notification Aggr DeleteAll
  11. 646writesTable 2000000098 API Webhook Notification Aggr Insert
  12. 648callsChangeTypeToString
  13. 649callsDateTimeToString
  14. 651callsDateTimeToString

IsNullUpdate line 673, local

  1. 685callsGetTableIdBySubscriptionId
  2. 692callsGetSystemIdBySubscriptionId
  3. 693callsDateTimeToString
  4. 706callsNullUpdateTreshold
  5. 708callsGetSystemIdBySubscriptionId
  6. 709callsDateTimeToString
  7. 709callsDateTimeToString
  8. 714callsGetSystemIdBySubscriptionId
  9. 715callsDateTimeToString
  10. 715callsDateTimeToString

CollectValuesInDictionaries line 719, local

  1. 721callsCollectSystemIdBySubscriptionId
  2. 722callsCollectTableIdBySubscriptionId
  3. 723callsCollectKeyFieldTypeBySubscriptionId
  4. 724callsCollectResourceUrlBySubscriptionId
  5. 725callsCollectNotificationUrlBySubscriptionId
  6. 726callsCollectSubscriptionsPerNotificationUrl
  7. 727callsCollectSubscriptionTypesPerNotificationUrl

CollectSystemIdBySubscriptionId line 730, local

  1. 735callsCodeunit 6153 API Webhook Notification Mgt. IsDetailedLoggingEnabled

CollectTableIdBySubscriptionId line 741, local

  1. 746callsCodeunit 6153 API Webhook Notification Mgt. IsDetailedLoggingEnabled

CollectKeyFieldTypeBySubscriptionId line 751, local

  1. 758callsCodeunit 6153 API Webhook Notification Mgt. IsDetailedLoggingEnabled
  2. 761callsCodeunit 6153 API Webhook Notification Mgt. GetEntity
  3. 765callsCodeunit 6153 API Webhook Notification Mgt. TryGetEntityKeyField

CollectFirstModifiedTimeBySubscriptionId line 774, local

  1. 780callsGetSystemIdBySubscriptionId
  2. 790writesTable 2000000096 API Webhook Notification Insert
  3. 798writesTable 2000000096 API Webhook Notification Modify

CollectResourceUrlBySubscriptionId line 805, local

  1. 810callsCodeunit 6153 API Webhook Notification Mgt. IsDetailedLoggingEnabled
  2. 815callsCodeunit 6153 API Webhook Notification Mgt. IsDetailedLoggingEnabled
  3. 817callsGetResourceUrl

CollectNotificationUrlBySubscriptionId line 821, local

  1. 826callsCodeunit 6153 API Webhook Notification Mgt. IsDetailedLoggingEnabled
  2. 831callsCodeunit 6153 API Webhook Notification Mgt. IsDetailedLoggingEnabled
  3. 833callsGetNotificationUrl

CollectSubscriptionsPerNotificationUrl line 837, local

  1. 845callsCodeunit 6153 API Webhook Notification Mgt. IsDetailedLoggingEnabled
  2. 848callsGetNotificationUrlBySubscriptionId

CollectSubscriptionTypesPerNotificationUrl line 861, local

  1. 868callsCodeunit 6153 API Webhook Notification Mgt. IsDetailedLoggingEnabled
  2. 871callsGetNotificationUrlBySubscriptionId

DeleteNotifications line 882, local

  1. 888callsGetSystemIdBySubscriptionId
  2. 890callsClearFiltersFromNotificationsBuffer
  3. 892writesTable 2000000098 API Webhook Notification Aggr DeleteAll

DeleteInvalidSubscriptions line 897, local

  1. 904callsGetSystemIdBySubscriptionId
  2. 907callsLogActivity
  3. 907callsGetSubscriptionDetails
  4. 908callsCodeunit 6153 API Webhook Notification Mgt. DeleteSubscription

DeleteObsoleteNotifications line 913, local

  1. 921callsGetActiveSubscriptions
  2. 923callsGetDeletedSubscriptionsByAggregateNotifications
  3. 925callsDeleteObsoleteAggregateNotifications
  4. 929callsGetDeletedSubscriptionsByNotifications

DeleteObsoleteNotifications line 971, local

  1. 988callsCodeunit 6153 API Webhook Notification Mgt. ForceDeleteAPIWebhookNotifications

DeleteObsoleteAggregateNotifications line 992, local

  1. 1009writesTable 2000000098 API Webhook Notification Aggr DeleteAll

IncreaseAttemptNumber line 1013, local

  1. 1018callsDateTimeToString
  2. 1020callsGetSystemIdBySubscriptionId
  3. 1020callsDateTimeToString
  4. 1022callsLogActivity
  5. 1022callsGetSubscriptionDetails
  6. 1023callsClearFiltersFromNotificationsBuffer
  7. 1027callsGetSystemIdBySubscriptionId
  8. 1030writesTable 2000000098 API Webhook Notification Aggr Modify
  9. 1032callsChangeTypeToString
  10. 1033callsDateTimeToString
  11. 1035callsDateTimeToString
  12. 1036callsDateTimeToString
  13. 1039callsChangeTypeToString
  14. 1040callsDateTimeToString
  15. 1042callsDateTimeToString
  16. 1043callsDateTimeToString

UpdateTablesFromBuffer line 1049, local

  1. 1051callsDeleteSubscriptionsWithTooManyFailures
  2. 1052callsDeleteProcessedNotifications
  3. 1053callsSaveFailedAggregateNotifications

DeleteProcessedNotifications line 1056, local

  1. 1061callsDateTimeToString
  2. 1065callsCodeunit 6153 API Webhook Notification Mgt. ForceDeleteAPIWebhookNotifications

SaveFailedAggregateNotifications line 1069, local

  1. 1076writesTable 2000000098 API Webhook Notification Aggr DeleteAll(true)
  2. 1077callsClearFiltersFromNotificationsBuffer
  3. 1085callsGetDelayTimeForAttempt
  4. 1090callsCodeunit 6153 API Webhook Notification Mgt. IsDetailedLoggingEnabled
  5. 1091callsGetSystemIdBySubscriptionId
  6. 1091callsChangeTypeToString
  7. 1092callsDateTimeToString
  8. 1093writesTable 2000000098 API Webhook Notification Aggr Insert(true)
  9. 1094callsGetSystemIdBySubscriptionId
  10. 1095callsChangeTypeToString
  11. 1096callsDateTimeToString
  12. 1098callsDateTimeToString
  13. 1103callsDateTimeToString

SendNotification line 1106, local

  1. 1127raisesOnBeforeSendNotification
  2. 1130callsSendRequest
  3. 1137raisesOnAfterSendNotification
  4. 1138raisesOnAfterSendNotificationWithStatusNumber
  5. 1142callsShouldReschedule
  6. 1144callsLogActivity

SendRequest line 1160, local

  1. 1183callsCodeunit 1297 Http Web Request Mgt. Initialize
  2. 1184callsCodeunit 1297 Http Web Request Mgt. DisableUI
  3. 1185callsCodeunit 1297 Http Web Request Mgt. SetMethod
  4. 1186callsCodeunit 1297 Http Web Request Mgt. SetReturnType
  5. 1187callsCodeunit 1297 Http Web Request Mgt. SetContentType
  6. 1188callsCodeunit 1297 Http Web Request Mgt. AddHeader
  7. 1189callsCodeunit 1297 Http Web Request Mgt. AddHeader
  8. 1194callsAddTokenToRequestHeader
  9. 1196callsCodeunit 1297 Http Web Request Mgt. SetTimeout
  10. 1196callsGetSendingNotificationTimeout
  11. 1199callsCodeunit 1297 Http Web Request Mgt. AddBodyAsTextWithEncoding
  12. 1201raisesOnSendRequestOnBeforeSendRequestAndReadTextResponse
  13. 1202callsGetMaskedUrl
  14. 1204callsCodeunit 1297 Http Web Request Mgt. SendRequestAndReadTextResponse
  15. 1211callsGetMaskedUrl

AddTokenToRequestHeader line 1216, local

  1. 1223callsCodeunit 7201 CDS Integration Impl. GetBusinessEventAccessToken
  2. 1224callsCodeunit 1297 Http Web Request Mgt. AddHeader

GetEntityJObject line 1280, local

  1. 1287callsGetSystemIdBySubscriptionId
  2. 1288callsClearFiltersFromSubscriptionsBuffer
  3. 1295callsGetEntityUrl
  4. 1304callsChangeTypeToString
  5. 1307callsCodeunit 5459 JSON Management InitializeEmptyObject
  6. 1308callsCodeunit 5459 JSON Management GetJSONObject
  7. 1309callsCodeunit 5459 JSON Management AddJPropertyToJObject
  8. 1310callsCodeunit 5459 JSON Management AddJPropertyToJObject
  9. 1311callsCodeunit 5459 JSON Management AddJPropertyToJObject
  10. 1312callsCodeunit 5459 JSON Management AddJPropertyToJObject
  11. 1313callsCodeunit 5459 JSON Management AddJPropertyToJObject
  12. 1313callsChangeTypeToString
  13. 1314callsCodeunit 5459 JSON Management AddJPropertyToJObject
  14. 1317callsCodeunit 5459 JSON Management AddJPropertyToJObject
  15. 1317callsGetAadUserId

GetAadUserId line 1321, local

  1. 1331callsCodeunit 5465 Graph Mgt - General Tools StripBrackets

GetEntityUrl line 1348, local

  1. 1353callsGetSingleEntityUrl
  2. 1355callsGetEntityCollectionUrl

GetSingleEntityUrl line 1359, local

  1. 1366callsGetResourceUrlBySubscriptionId
  2. 1371callsAddCompanyIdToResource
  3. 1373callsGetEntityKeyFieldTypeBySubscriptionId
  4. 1377callsGetUriEscapeFieldValue

GetEntityCollectionUrl line 1383, local

  1. 1391callsGetResourceUrlBySubscriptionId
  2. 1396callsAddCompanyIdToResource
  3. 1398callsGetFirstModifiedTimeBySubscriptionId
  4. 1402callsHasLastModifiedDateTimeField
  5. 1407callsDateTimeToUtcString

GetUriEscapeFieldValue line 1412, local

  1. 1419callsAddQuotes
  2. 1419callsCodeunit 10 Type Helper UriEscapeDataString
  3. 1421callsAddQuotes
  4. 1423callsAddQuotes
  5. 1423callsCodeunit 10 Type Helper UriEscapeDataString
  6. 1425callsAddQuotes

GetEntityKeyFieldTypeBySubscriptionId line 1437, local

  1. 1442callsGetSystemIdBySubscriptionId
  2. 1448callsGetSystemIdBySubscriptionId
  3. 1452callsCodeunit 6153 API Webhook Notification Mgt. IsDetailedLoggingEnabled
  4. 1453callsGetSystemIdBySubscriptionId

GetFirstModifiedTimeBySubscriptionId line 1457, local

  1. 1463callsGetSystemIdBySubscriptionId
  2. 1469callsGetSystemIdBySubscriptionId
  3. 1473callsCodeunit 6153 API Webhook Notification Mgt. IsDetailedLoggingEnabled
  4. 1474callsGetSystemIdBySubscriptionId
  5. 1474callsDateTimeToString

GetResourceUrlBySubscriptionId line 1510, local

  1. 1515callsGetSystemIdBySubscriptionId
  2. 1521callsGetSystemIdBySubscriptionId
  3. 1525callsCodeunit 6153 API Webhook Notification Mgt. IsDetailedLoggingEnabled
  4. 1526callsGetSystemIdBySubscriptionId

GetNotificationUrlBySubscriptionId line 1530, local

  1. 1535callsGetSystemIdBySubscriptionId
  2. 1541callsGetSystemIdBySubscriptionId
  3. 1545callsCodeunit 6153 API Webhook Notification Mgt. IsDetailedLoggingEnabled
  4. 1546callsGetSystemIdBySubscriptionId

GetSubscriptionsPerNotificationUrl line 1550, local

  1. 1569callsCodeunit 6153 API Webhook Notification Mgt. IsDetailedLoggingEnabled

HasLastModifiedDateTimeField line 1594, local

  1. 1600callsCodeunit 6153 API Webhook Notification Mgt. GetEntity

GetActiveSubscriptions line 1619, local

  1. 1636writesTable 2000000095 API Webhook Subscription Insert
  2. 1637callsCollectValuesInDictionaries

DeleteObsoleteSubscriptions line 1642, local

  1. 1651callsCodeunit 6153 API Webhook Notification Mgt. GetEntity
  2. 1653callsDateTimeToString
  3. 1654callsLogActivity
  4. 1654callsGetSubscriptionDetails
  5. 1655callsCodeunit 6153 API Webhook Notification Mgt. DeleteSubscription

DeleteExpiredSubscriptions line 1660, local

  1. 1671callsDateTimeToString
  2. 1672callsLogActivity
  3. 1673callsGetSubscriptionDetails
  4. 1674callsCodeunit 6153 API Webhook Notification Mgt. DeleteSubscription

DeleteSubscriptionsWithTooManyFailures line 1678, local

  1. 1682callsClearFiltersFromNotificationsBuffer
  2. 1683callsGetMaxNumberOfAttempts
  3. 1689callsDateTimeToString
  4. 1691callsLogActivity
  5. 1692callsGetSubscriptionDetails
  6. 1693callsCodeunit 6153 API Webhook Notification Mgt. DeleteSubscription
  7. 1696writesTable 2000000098 API Webhook Notification Aggr DeleteAll

DeleteInactiveJobs line 1699, local

  1. 1703raisesOnBeforeDeleteInactiveJobs
  2. 1709callsDateTimeToString
  3. 1710writesTable 472 Job Queue Entry Delete(true)
  4. 1718callsDateTimeToString
  5. 1719writesTable 472 Job Queue Entry Delete(true)
  6. 1723callsDateTimeToString
  7. 1724writesTable 472 Job Queue Entry Delete(true)

IsApiSubscriptionEnabled line 1744, local

  1. 1748callsCodeunit 5465 Graph Mgt - General Tools IsApiSubscriptionEnabled

GetMaxNumberOfNotifications line 1756

  1. 1762raisesOnGetMaxNumberOfNotifications
  2. 1766callsCodeunit 6723 Server Setting GetApiSubscriptionMaxNumberOfNotifications

GetMaxNumberOfAttempts line 1770, local

  1. 1775raisesOnGetMaxNumberOfAttempts

GetSendingNotificationTimeout line 1782, local

  1. 1788raisesOnGetSendingNotificationTimeout
  2. 1792callsCodeunit 6723 Server Setting GetApiSubscriptionSendingNotificationTimeout

HandleOnBeforeInsertJobQueueLogEntry line 1825, local

  1. 1836callsDateTimeToString
  2. 1840callsLogActivity

DateTimeToUtcString line 1899

  1. 1906callsCodeunit 5459 JSON Management InitializeEmptyObject
  2. 1907callsCodeunit 5459 JSON Management GetJSONObject
  3. 1908callsCodeunit 5459 JSON Management AddJPropertyToJObject
  4. 1909callsCodeunit 5459 JSON Management GetStringPropertyValueFromJObjectByName

LogActivity line 1913, local

  1. 1923callsTable 710 Activity Log LogActivity

GetSubscriptionDetails line 1927, local

  1. 1932callsGetResourceUrlBySubscriptionId
  2. 1933callsGetNotificationUrlBySubscriptionId