Codeunit 1410 Doc. Exch. Service Mgt.

Base Application, Microsoft.EServices.EDocument

src/Layers/W1/BaseApp/eServices/EDocument/DocExchServiceMgt.Codeunit.al90 procedures and triggers, in source order. Copyright (c) Microsoft Corporation. MIT

SetURLsToDefault line 157

  1. 162raisesOnBeforeSetURLsToDefaultIsHandled
  2. 179callsTable 1275 Doc. Exch. Service Setup SetDefaultRedirectUrl

GetAppUrl line 184

  1. 194callsIsSandbox
  2. 195callsGetClientId

GetDefaultRedirectUrl line 204

  1. 209callsCodeunit 501 OAuth2 GetDefaultRedirectUrl

SetDefaultRedirectUrl line 214

  1. 218callsGetDefaultRedirectUrl

SetPropertiesBasedOnAuthRequestUrlAndRunOAuth2ControlAddIn line 222, local

  1. 231callsPage 1276 Doc. Exch. Service Auth. SetOAuth2Properties
  2. 235callsPage 1276 Doc. Exch. Service Auth. GetAuthCodeAsSecretText
  3. 236callsPage 1276 Doc. Exch. Service Auth. GetAuthError

AcquireAccessTokenByAuthorizationCode line 239, local

  1. 248callsGetGUID
  2. 249callsUrlEncode
  3. 249callsUrlEncode
  4. 249callsUrlEncode
  5. 249callsUrlEncode
  6. 250callsSetPropertiesBasedOnAuthRequestUrlAndRunOAuth2ControlAddIn
  7. 259callsGetDefaultRedirectUrl
  8. 260callsUrlEncode
  9. 260callsUrlEncode
  10. 260callsUrlEncode
  11. 260callsUrlEncode
  12. 261callsTryAcquireAccessToken

AcquireAccessTokenByRefreshToken line 278, local

  1. 287callsGetServiceSetUp
  2. 288callsTable 1275 Doc. Exch. Service Setup GetRefreshTokenAsSecretText
  3. 294callsUrlEncode
  4. 294callsUrlEncode
  5. 294callsUrlEncode
  6. 294callsUrlEncode
  7. 295callsTryAcquireAccessToken

TryAcquireAccessToken line 314, local

  1. 327callsCodeunit 4100 Temp Blob CreateOutStream
  2. 330callsCodeunit 1297 Http Web Request Mgt. Initialize
  3. 331callsCodeunit 1297 Http Web Request Mgt. DisableUI
  4. 332callsCodeunit 1297 Http Web Request Mgt. SetMethod
  5. 333callsCodeunit 1297 Http Web Request Mgt. SetContentType
  6. 334callsCodeunit 1297 Http Web Request Mgt. SetContentLength
  7. 334callsCodeunit 4100 Temp Blob Length
  8. 335callsCodeunit 1297 Http Web Request Mgt. SetUserAgent
  9. 335callsGetUserAgent
  10. 336callsCodeunit 1297 Http Web Request Mgt. SetReturnType
  11. 337callsCodeunit 1297 Http Web Request Mgt. AddHeader
  12. 338callsCodeunit 1297 Http Web Request Mgt. AddBasicAuthentication
  13. 339callsCodeunit 1297 Http Web Request Mgt. AddBodyBlob
  14. 341callsCodeunit 1297 Http Web Request Mgt. SendRequestAndReadTextResponse
  15. 348callsParseTokenResponse

ParseTokenResponse line 375, local

  1. 384callsGetJsonKeyValue
  2. 389callsGetJsonKeyValue
  3. 394callsGetJsonKeyValue
  4. 399callsGetJsonKeyValue
  5. 404callsGetJsonKeyValue
  6. 406callsGetJsonKeyValue

MarkTokenAsExpired line 436, local

  1. 440callsGetServiceSetUp
  2. 442writesTable 1275 Doc. Exch. Service Setup Modify

SendRenewTokenNotification line 446

  1. 452callsGetRenewTokenNotificationId

RecallActivateAppNotification line 459

  1. 463callsGetActivateAppNotificationId

SendActivateAppNotification line 468

  1. 477raisesOnBeforeSendActivateAppNotificationIsHandled
  2. 487callsIsSandbox
  3. 488callsGetClientId
  4. 492callsGetActivateAppNotificationId
  5. 496callsGetAppUrl

ActivateApp line 502

  1. 506callsSendActivateAppNotification
  2. 507callsGetServiceSetUp
  3. 508callsGetAppUrl

RenewToken line 518

  1. 526callsTryAcquireAccessTokenByRefreshToken
  2. 527callsSaveTokens
  3. 528callsTryCheckConnection
  4. 532callsAcquireAccessTokenByAuthorizationCode
  5. 533callsTryCheckConnection
  6. 536callsGetServiceSetUp
  7. 538callsLogActivitySucceeded
  8. 543callsLogActivityFailedAndError

GetRenewTokenNotificationId line 546, local

  1. 548callsTextToGuid

GetActivateAppNotificationId line 551, local

  1. 553callsTextToGuid

TryCheckConnection line 572, local

  1. 576callsVerifyPrerequisites
  2. 578callsGetServiceSetUp
  3. 579callsExecuteWebServiceGetRequest
  4. 579callsGetCheckConnectionURL

CheckConnection line 583

  1. 587callsVerifyPrerequisites
  2. 589callsGetServiceSetUp
  3. 590callsExecuteWebServiceGetRequest
  4. 590callsGetCheckConnectionURL
  5. 591callsLogActivityFailedAndError
  6. 593callsLogActivitySucceeded
  7. 599callsCodeunit 1292 Trace LogStreamToTempFile

SendUBLDocument line 603

  1. 608callsCheckServiceEnabled
  2. 609callsCodeunit 8703 Feature Telemetry LogUptake
  3. 610callsCodeunit 8703 Feature Telemetry LogUsage
  4. 614callsCheckDocumentStatus
  5. 616callsExecuteWebServicePostRequest
  6. 616callsGetPostSalesURL
  7. 617callsLogActivityFailedAndError
  8. 619callsLogActivitySucceeded
  9. 621callsCodeunit 1411 Doc. Exch. Links UpdateDocumentRecord
  10. 623callsLogTelemetryDocumentSent

SendDocument line 632

  1. 637callsCheckServiceEnabled
  2. 639callsGetGUID
  3. 642callsCheckDocumentStatus
  4. 644callsPutDocument
  5. 645callsDispatchDocument
  6. 647callsLogTelemetryDocumentSent

HasPredefinedOAuth2Params line 656

  1. 658callsGetPredefinedClientId
  2. 660callsGetPredefinedClientSecret
  3. 662callsGetPredefinedClientId
  4. 664callsGetPredefinedClientSecret

GetClientId line 670

  1. 675callsGetPredefinedClientId

GetPredefinedClientId line 682, local

  1. 692callsCodeunit 457 Environment Information IsSaaSInfrastructure
  2. 693callsCodeunit 2200 Azure Key Vault GetAzureKeyVaultSecret
  3. 699raisesOnGetClientId

GetClientSecretAsSecretText line 705

  1. 710callsGetPredefinedClientSecret
  2. 713callsTable 1275 Doc. Exch. Service Setup GetClientSecretAsSecretText

GetPredefinedClientSecret line 717, local

  1. 730callsCodeunit 457 Environment Information IsSaaSInfrastructure
  2. 731callsCodeunit 2200 Azure Key Vault GetAzureKeyVaultSecret
  3. 737raisesOnGetClientSecret

VerifyIdToken line 745, local

  1. 757callsTryGetSecurityToken
  2. 763callsGetServiceSetUp
  3. 765callsIsSandbox
  4. 766callsGetClientId

ParseIdToken line 782, local

  1. 788callsTryParseIdToken

TryParseIdToken line 795, local

  1. 803callsTryGetSecurityToken

SaveTokens line 826, local

  1. 833callsGetServiceSetUp
  2. 834callsTable 1275 Doc. Exch. Service Setup SetAccessToken
  3. 835callsTable 1275 Doc. Exch. Service Setup SetRefreshToken
  4. 837callsParseIdToken
  5. 847writesTable 1275 Doc. Exch. Service Setup Modify

AcquireAccessTokenByAuthorizationCode line 851

  1. 858callsVerifyIdToken
  2. 859callsSaveTokens

AcquireAccessTokenByAuthorizationCode line 862, local

  1. 875callsGetOAuth2Params

AcquireAccessTokenByRefreshToken line 880

  1. 886callsSaveTokens

TryAcquireAccessTokenByRefreshToken line 890, local

  1. 892callsAcquireAccessTokenByRefreshToken

AcquireAccessTokenByRefreshToken line 895, local

  1. 903callsGetOAuth2Params

GetOAuth2Params line 907, local

  1. 912callsGetServiceSetUp
  2. 914callsCheckServiceEnabled
  3. 933callsIsSandbox
  4. 935callsGetClientId
  5. 938callsGetMissingClientIdOrSecretErr
  6. 941callsGetClientSecretAsSecretText
  7. 944callsGetMissingClientIdOrSecretErr

GetMissingClientIdOrSecretErr line 948, local

  1. 950callsCodeunit 457 Environment Information IsSaaSInfrastructure

PutDocument line 956, local

  1. 960callsExecuteWebServicePutRequest
  2. 960callsGetPUTDocURL
  3. 961callsLogActivityFailedAndError
  4. 966callsLogActivityFailedAndError
  5. 968callsLogActivitySucceeded
  6. 971callsCodeunit 1292 Trace LogStreamToTempFile

DispatchDocument line 974, local

  1. 981callsExecuteWebServicePostRequest
  2. 981callsGetDispatchDocURL
  3. 982callsLogActivityFailedAndError
  4. 987callsCodeunit 1411 Doc. Exch. Links UpdateDocumentRecord
  5. 988callsLogActivityFailedAndError
  6. 992callsCodeunit 1292 Trace LogStreamToTempFile
  7. 994callsGetDocumentIDKey
  8. 996callsLogActivityFailedAndError
  9. 997callsCodeunit 1411 Doc. Exch. Links UpdateDocumentRecord
  10. 999callsLogActivitySucceeded

GetDocumentStatus line 1003

  1. 1007callsCheckServiceEnabled
  2. 1011callsGetDocDispatchErrors
  3. 1016callsGetDocumentMetadata

GetDocDispatchErrors line 1023, local

  1. 1027callsCheckServiceEnabled
  2. 1029callsExecuteWebServiceGetRequest
  3. 1029callsGetDispatchErrorsURL
  4. 1030callsLogActivityFailed
  5. 1034callsCodeunit 1297 Http Web Request Mgt. TryLoadXMLResponse
  6. 1035callsLogActivityFailed
  7. 1039callsCodeunit 6224 XML DOM Management FindNodeTextWithNamespace
  8. 1039callsGetErrorXPath
  9. 1040callsGetPrefix
  10. 1040callsGetApiNamespace
  11. 1042callsLogActivitySucceeded
  12. 1045callsCodeunit 1292 Trace LogStreamToTempFile

GetDocumentMetadata line 1051

  1. 1055callsCheckServiceEnabled
  2. 1058callsExecuteWebServiceGetRequest
  3. 1058callsGetDocStatusURL
  4. 1059callsLogActivityFailed
  5. 1063callsCodeunit 1297 Http Web Request Mgt. TryLoadXMLResponse
  6. 1064callsLogActivityFailed
  7. 1069callsCodeunit 1292 Trace LogStreamToTempFile
  8. 1071callsCodeunit 6224 XML DOM Management FindNodeTextWithNamespace
  9. 1071callsGetStatusXPath
  10. 1071callsGetPrefix
  11. 1071callsGetPublicNamespace
  12. 1072callsLogActivitySucceeded

ReceiveDocuments line 1077

  1. 1081callsCheckServiceEnabled
  2. 1083callsExecuteWebServiceGetRequest
  3. 1083callsGetRetrieveDocsURL
  4. 1084callsLogActivityFailedAndError
  5. 1086callsCodeunit 1297 Http Web Request Mgt. TryLoadXMLResponse
  6. 1087callsLogActivityFailedAndError
  7. 1089callsProcessReceivedDocs

ProcessReceivedDocs line 1092, local

  1. 1104callsCodeunit 6224 XML DOM Management FindNodeTextWithNamespace
  2. 1104callsGetDocumentIDXPath
  3. 1105callsGetPrefix
  4. 1105callsGetPublicNamespace
  5. 1108callsLogActivityFailedAndError
  6. 1109callsTryGetDocumentDescription
  7. 1112callsGetOriginalDocument
  8. 1113callsCreateIncomingDocEntry
  9. 1115callsMarkDocBusinessProcessed
  10. 1116writesTable 130 Incoming Document Delete
  11. 1117callsLogActivityFailed
  12. 1119callsLogActivitySucceeded
  13. 1123callsLogTelemetryDocumentReceived
  14. 1124raisesOnAfterIncomingDocReceivedFromDocExch

GetOriginalDocument line 1128, local

  1. 1130callsCheckServiceEnabled
  2. 1133callsExecuteWebServiceGetRequest
  3. 1133callsGetRetrieveOriginalDocIDURL
  4. 1134callsGetDocument

GetDocument line 1137, local

  1. 1139callsCheckServiceEnabled
  2. 1141callsExecuteWebServiceGetRequest
  3. 1141callsGetRetrieveDocIDURL
  4. 1142callsLogActivityFailedAndError

MarkDocBusinessProcessed line 1146, local

  1. 1150callsCheckServiceEnabled
  2. 1151callsExecuteWebServicePutRequest
  3. 1151callsGetSetTagURL

CreateIncomingDocEntry line 1154, local

  1. 1160callsCodeunit 1297 Http Web Request Mgt. TryLoadXMLResponse
  2. 1161callsLogActivityFailedAndError
  3. 1163callsTable 130 Incoming Document CreateIncomingDocument
  4. 1164callsGetExternalDocURL
  5. 1167callsTable 130 Incoming Document AddAttachmentFromStream
  6. 1168callsProcessAttachments

ProcessAttachments line 1171, local

  1. 1176callsCodeunit 6224 XML DOM Management FindNodesWithNamespace
  2. 1176callsGetEmbeddedDocXPath
  3. 1176callsGetPrefix
  4. 1176callsGetCBCNamespace
  5. 1179callsExtractAdditionalAttachment

ExtractAdditionalAttachment line 1182, local

  1. 1190callsCodeunit 6224 XML DOM Management GetAttributeValue
  2. 1191callsCodeunit 419 File Management ServerTempFileName
  3. 1191callsCodeunit 419 File Management GetExtension
  4. 1192callsCodeunit 419 File Management IsAllowedPath
  5. 1194callsTable 130 Incoming Document AddAttachmentFromServerFile

Initialize line 1197, local

  1. 1202callsCheckCredentials
  2. 1203callsGetServiceSetUp
  3. 1204callsTable 1275 Doc. Exch. Service Setup GetAccessTokenAsSecretText
  4. 1211callsCodeunit 1297 Http Web Request Mgt. Initialize
  5. 1212callsCodeunit 1297 Http Web Request Mgt. SetMethod
  6. 1213callsCodeunit 1297 Http Web Request Mgt. AddHeader
  7. 1215callsSetDefaults

SetDefaults line 1218, local

  1. 1222callsCodeunit 1297 Http Web Request Mgt. SetContentType
  2. 1223callsCodeunit 1297 Http Web Request Mgt. SetReturnType
  3. 1224callsCodeunit 1297 Http Web Request Mgt. SetUserAgent
  4. 1224callsGetUserAgent
  5. 1225callsCodeunit 1297 Http Web Request Mgt. AddHeader
  6. 1226callsCodeunit 1297 Http Web Request Mgt. AddBodyBlob
  7. 1229callsGetServiceSetUp
  8. 1231callsCodeunit 1297 Http Web Request Mgt. SetTraceLogEnabled

CheckCredentials line 1234

  1. 1238callsVerifyPrerequisites
  2. 1242callsVerifyPrerequisites

ExecuteWebServiceGetRequest line 1248, local

  1. 1252callsExecuteWebServiceRequest

ExecuteWebServicePostRequest line 1255, local

  1. 1257callsExecuteWebServiceRequest

ExecuteWebServicePutRequest line 1260, local

  1. 1262callsExecuteWebServiceRequest

ExecuteWebServiceRequest line 1265, local

  1. 1270callsInitialize
  2. 1277callsAcquireAccessTokenByRefreshToken
  3. 1278callsInitialize
  4. 1286callsGetServiceSetUp
  5. 1287callsLogActivityFailed
  6. 1288callsMarkTokenAsExpired
  7. 1289callsSendRenewTokenNotification

ExecuteWebServiceRequest line 1294, local

  1. 1302callsCodeunit 4100 Temp Blob CreateInStream
  2. 1305callsCodeunit 1297 Http Web Request Mgt. DisableUI
  3. 1307callsCodeunit 1297 Http Web Request Mgt. GetResponse
  4. 1308callsCodeunit 1297 Http Web Request Mgt. ProcessFaultXMLResponse
  5. 1308callsGetErrorXPath
  6. 1308callsGetPrefix
  7. 1308callsGetApiNamespace

CheckServiceEnabled line 1318

  1. 1322callsGetServiceSetUp

CheckDocumentStatus line 1342, local

  1. 1349raisesOnBeforeCheckDocumentStatusIsHandled

GetUserAgent line 1379, local

  1. 1383callsGetServiceSetUp

GetFullURL line 1391, local

  1. 1395callsGetServiceSetUp

GetCheckConnectionURL line 1403, local

  1. 1405callsGetFullURL

GetPostSalesURL line 1408, local

  1. 1410raisesOnBeforeGetPostSalesURL
  2. 1416callsGetPostSalesInvURL
  3. 1418callsGetPostSalesCrMemoURL

GetPostSalesInvURL line 1424

  1. 1427callsGetFullURL
  2. 1427callsGetGUID

GetPostSalesCrMemoURL line 1430

  1. 1433callsGetFullURL
  2. 1433callsGetGUID

GetDocStatusURL line 1436, local

  1. 1438callsGetFullURL

GetPUTDocURL line 1441, local

  1. 1443callsGetFullURL

GetDispatchDocURL line 1446, local

  1. 1448callsGetFullURL

GetDispatchErrorsURL line 1451, local

  1. 1453callsGetFullURL

GetRetrieveDocsURL line 1456, local

  1. 1458callsGetFullURL
  2. 1458callsGetChunckSize

GetRetrieveDocIDURL line 1461, local

  1. 1463callsGetFullURL

GetRetrieveOriginalDocIDURL line 1466, local

  1. 1468callsGetFullURL

GetSetTagURL line 1471, local

  1. 1473callsGetFullURL

GetErrorXPath line 1518, local

  1. 1520callsGetPrefix

GetStatusXPath line 1523, local

  1. 1525callsGetPrefix

GetDocumentIDXPath line 1528, local

  1. 1530callsGetPrefix

GetDocumentTypeXPath line 1533, local

  1. 1535callsGetPrefix

GetDocumentIDForDescriptionXPath line 1538, local

  1. 1540callsGetPrefix

GetEmbeddedDocXPath line 1543, local

  1. 1545callsGetPrefix

TryGetDocumentDescription line 1559, local

  1. 1567callsCodeunit 6224 XML DOM Management FindNodeWithNamespace
  2. 1567callsGetDocumentTypeXPath
  3. 1567callsGetPrefix
  4. 1568callsGetPublicNamespace
  5. 1569callsMapDocumentType
  6. 1569callsCodeunit 6224 XML DOM Management GetAttributeValue
  7. 1570callsCodeunit 6224 XML DOM Management FindNodeTextWithNamespace
  8. 1570callsGetDocumentIDForDescriptionXPath
  9. 1571callsGetPrefix
  10. 1571callsGetPublicNamespace

LogActivitySucceeded line 1589

  1. 1593callsTable 710 Activity Log LogActivity

LogActivityFailed line 1597

  1. 1602callsLogActivityFailedCommon

LogActivityFailedAndError line 1605

  1. 1607callsLogActivityFailedCommon

LogActivityFailedCommon line 1612, local

  1. 1619callsTable 710 Activity Log LogActivity
  2. 1623callsTable 710 Activity Log SetDetailedInfoFromStream

HandleVANRegisterServiceConnection line 1634

  1. 1641writesTable 1275 Doc. Exch. Service Setup Insert
  2. 1651callsTable 1400 Service Connection InsertServiceConnection

GetExternalDocURL line 1671

  1. 1676callsGetFullURL

VerifyPrerequisites line 1682

  1. 1690raisesOnBeforeVerifyPrerequisitesIsHandled

LogTelemetryDocumentSent line 1705, local

  1. 1709callsGetServiceSetUp

LogTelemetryDocumentReceived line 1714, local

  1. 1718callsGetServiceSetUp