{"title":"Codeunit 6700 O365 Sync. Management, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/6700-o365-sync-management/points/","author":"JOP-AL","license":"Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-10-05","object":{"type":"codeunit","id":6700,"name":"O365 Sync. Management","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/6700-o365-sync-management/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/6700-o365-sync-management/source/","path":"src/Layers/W1/BaseApp/O365SyncManagement.Codeunit.al","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","lines":"a line is <source url>#L<line>"},"steps":{"event":"[line, \"event\", name, handled]: raises an event of this object; handled 1 when it has an IsHandled parameter","call":"[line, \"call\", name, arguments]: calls a procedure of this object","ext":"[line, \"ext\", type, id, name, arguments]: calls a procedure of another object, through a variable declared with that type","write":"[line, \"write\", table id, method, 1 when called with true]: Insert, Modify, ModifyAll, Delete, DeleteAll or Rename","validate":"[line, \"validate\", table id, field name]","run":"[line, \"run\", type, id]: Codeunit.Run, Page.Run, Report.Run and their kin"},"objects":{"codeunit:6703":{"name":"Exchange Contact Sync.","url":"https://jonas-paprotka.de/ref/codeunit/6703-exchange-contact-sync/"},"codeunit:6704":{"name":"Booking Customer Sync.","url":"https://jonas-paprotka.de/ref/codeunit/6704-booking-customer-sync/"},"codeunit:6705":{"name":"Booking Service Sync.","url":"https://jonas-paprotka.de/ref/codeunit/6705-booking-service-sync/"},"table:6704":{"name":"Booking Mailbox","url":"https://jonas-paprotka.de/ref/table/6704-booking-mailbox/"},"table:472":{"name":"Job Queue Entry","url":"https://jonas-paprotka.de/ref/table/472-job-queue-entry/"},"codeunit:453":{"name":"Job Queue - Enqueue","url":"https://jonas-paprotka.de/ref/codeunit/453-job-queue-enqueue/"},"table:710":{"name":"Activity Log","url":"https://jonas-paprotka.de/ref/table/710-activity-log/"},"table:6700":{"name":"Exchange Sync","url":"https://jonas-paprotka.de/ref/table/6700-exchange-sync/"},"codeunit:5321":{"name":"Exchange Web Services Server","url":"https://jonas-paprotka.de/ref/codeunit/5321-exchange-web-services-server/"},"codeunit:6300":{"name":"Azure AD Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/6300-azure-ad-mgt/"},"codeunit:1293":{"name":"Isolated Storage Management","url":"https://jonas-paprotka.de/ref/codeunit/1293-isolated-storage-management/"}},"procs":[{"name":"OnRun","line":13,"kind":"trigger","steps":[[17,"event","OnBeforeOnRun",1],[21,"run","codeunit",6703],[22,"run","codeunit",6704],[23,"run","codeunit",6705]]},{"name":"GetBookingMailboxes","line":47,"kind":"procedure","params":3,"steps":[[52,"call","RegisterBookingsConnection",1],[54,"write",6704,"DeleteAll"],[59,"write",6704,"Insert"]]},{"name":"CreateExchangeConnection","line":64,"kind":"procedure","params":1,"steps":[[69,"call","IsO365Setup",1],[70,"call","GetUser",2],[72,"call","ValidateExchangeConnection",2]]},{"name":"IsO365Setup","line":77,"kind":"procedure","params":1,"steps":[[85,"call","GetUser",2],[89,"call","GetPasswordOrToken",3],[92,"call","OpenSetupWindow",0]]},{"name":"SetupContactSyncJobQueue","line":109,"kind":"procedure","access":"local","params":0,"steps":[[119,"ext","table",472,"InitRecurringJob",1],[123,"run","codeunit",453]]},{"name":"SyncBookingCustomers","line":130,"kind":"procedure","params":1,"steps":[[134,"call","TraceCategory",0],[135,"call","CheckUserAccess",1],[136,"call","ShowProgress",1],[137,"call","RegisterBookingsConnection",1],[138,"call","CloseProgress",0],[139,"ext","codeunit",6704,"SyncRecords",1]]},{"name":"SyncBookingServices","line":143,"kind":"procedure","params":1,"steps":[[147,"call","TraceCategory",0],[148,"call","CheckUserAccess",1],[149,"call","ShowProgress",1],[150,"call","RegisterBookingsConnection",1],[151,"call","CloseProgress",0],[152,"ext","codeunit",6705,"SyncRecords",1]]},{"name":"SyncExchangeContacts","line":156,"kind":"procedure","params":2,"steps":[[160,"call","TraceCategory",0],[161,"call","ShowProgress",1],[162,"call","RegisterExchangeConnection",1],[163,"call","CloseProgress",0],[164,"ext","codeunit",6703,"SyncRecords",2]]},{"name":"LogActivityFailed","line":167,"kind":"procedure","params":4,"steps":[[174,"ext","table",710,"LogActivityForUser",6]]},{"name":"BuildBookingsConnectionStringAsSecretText","line":180,"kind":"procedure","params":1,"steps":[[190,"call","GetUser",2],[192,"call","GetPasswordOrToken",3],[205,"ext","table",6700,"GetExchangeEndpoint",0]]},{"name":"BuildExchangeConnectionStringAsSecretText","line":210,"kind":"procedure","params":1,"steps":[[218,"call","GetUser",2],[220,"call","GetPasswordOrToken",3],[233,"ext","table",6700,"GetExchangeEndpoint",0]]},{"name":"RegisterBookingsConnection","line":237,"kind":"procedure","params":1,"steps":[[242,"call","UnregisterConnection",1],[244,"call","BookingsConnectionReady",1],[248,"call","UnregisterConnection",1],[253,"call","RegisterConnection",3],[254,"call","SetConnection",2]]},{"name":"RegisterExchangeConnection","line":258,"kind":"procedure","params":1,"steps":[[261,"call","UnregisterConnection",1],[263,"call","ExchangeConnectionReady",1],[267,"call","UnregisterConnection",1],[270,"call","RegisterConnection",3],[271,"call","SetConnection",2]]},{"name":"RegisterConnection","line":287,"kind":"procedure","access":"local","params":3,"steps":[[289,"call","TryRegisterConnection",2],[291,"call","ConnectionFailure",1]]},{"name":"SetConnection","line":301,"kind":"procedure","access":"local","params":2,"steps":[[303,"call","TrySetConnection",1],[305,"call","ConnectionFailure",1]]},{"name":"ConnectionFailure","line":315,"kind":"procedure","access":"local","params":1,"steps":[[317,"call","LogActivityFailed",4],[320,"call","CloseProgress",0]]},{"name":"ValidateExchangeConnection","line":326,"kind":"procedure","params":2,"steps":[[332,"call","CreateExchangeAccountCredentials",2],[334,"ext","codeunit",5321,"InitializeAndValidate",3],[336,"validate",6700,"Exchange Service URI"],[337,"write",6700,"Modify"]]},{"name":"CreateExchangeAccountCredentials","line":342,"kind":"procedure","access":"local","params":2,"steps":[[351,"call","GetUser",2],[355,"call","GetPasswordOrToken",3]]},{"name":"ShowProgress","line":370,"kind":"procedure","params":1,"steps":[[373,"call","CloseProgress",0]]},{"name":"CloseProgress","line":378,"kind":"procedure","params":0,"steps":[[381,"call","TryCloseProgress",0]]},{"name":"BookingsConnectionReady","line":396,"kind":"procedure","access":"local","params":1,"steps":[[400,"call","BuildBookingsConnectionStringAsSecretText",1],[401,"call","ConnectionStringChanged",2]]},{"name":"ExchangeConnectionReady","line":405,"kind":"procedure","access":"local","params":1,"steps":[[409,"call","BuildExchangeConnectionStringAsSecretText",1],[410,"call","ConnectionStringChanged",2]]},{"name":"GetPasswordOrToken","line":415,"kind":"procedure","access":"local","params":3,"steps":[[420,"ext","codeunit",6300,"GetAccessTokenAsSecretText",3],[420,"ext","codeunit",6300,"GetO365Resource",0],[420,"ext","codeunit",6300,"GetO365ResourceName",0],[422,"ext","codeunit",1293,"Get",3]]},{"name":"CheckUserAccess","line":428,"kind":"procedure","access":"local","params":1,"steps":[[437,"call","CreateExchangeAccountCredentials",2],[439,"ext","table",6700,"GetExchangeEndpoint",0]]}]}