{"title":"Codeunit 7106 O365 Bidirectional Sync, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/7106-o365-bidirectional-sync/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":7106,"name":"O365 Bidirectional Sync","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/7106-o365-bidirectional-sync/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/7106-o365-bidirectional-sync/source/","path":"src/Layers/W1/BaseApp/CRM/Outlook/O365BidirectionalSync.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":{"table:7013":{"name":"Contact Sync Queue","url":"https://jonas-paprotka.de/ref/table/7013-contact-sync-queue/"},"table:7121":{"name":"Contact Sync User","url":"https://jonas-paprotka.de/ref/table/7121-contact-sync-user/"},"table:7122":{"name":"Outlook Contacts","url":"https://jonas-paprotka.de/ref/table/7122-outlook-contacts/"},"codeunit:3060":{"name":"Uri","url":"https://jonas-paprotka.de/ref/codeunit/3060-uri/"},"table:7101":{"name":"Contact Sync Folder","url":"https://jonas-paprotka.de/ref/table/7101-contact-sync-folder/"}},"procs":[{"name":"GetContacts","line":117,"kind":"procedure","params":6,"steps":[[134,"write",7013,"DeleteAll"],[139,"call","getTracecat",0],[142,"call","getTracecat",0],[146,"call","GetDeltaUrl",1],[147,"call","IsApprovedGraphRequestUri",1],[149,"call","getTracecat",0],[151,"call","UpdateDeltaUrl",2],[160,"call","DoFullSync",3],[164,"call","DoFullSync",3],[166,"call","getTracecat",0],[167,"call","SetupHttpClientHeaders",2],[178,"call","NormalizeEmail",1],[179,"call","NormalizeEmail",1],[182,"call","IsApprovedGraphRequestUri",1],[186,"call","getTracecat",0],[191,"call","getTracecat",0],[194,"call","getTracecat",0],[195,"call","HandleErrorResponse",2],[199,"call","ParseContactsResponse",4],[200,"call","getTracecat",0],[208,"call","IsApprovedGraphRequestUri",1],[210,"call","getTracecat",0],[213,"call","getTracecat",0],[218,"call","IsApprovedGraphRequestUri",1],[226,"call","UpdateDeltaUrl",2],[228,"call","getTracecat",0],[229,"call","CompareAndQueueContacts",4],[230,"call","getTracecat",0],[232,"call","getTracecat",0]]},{"name":"UpdateDeltaUrl","line":240,"kind":"procedure","access":"local","params":2,"steps":[[250,"ext","table",7121,"SetDeltaUrl",1]]},{"name":"DoFullSync","line":253,"kind":"procedure","access":"local","params":3,"steps":[[258,"write",7122,"DeleteAll"]]},{"name":"ParseContactsResponse","line":261,"kind":"procedure","access":"local","params":4,"steps":[[283,"call","NormalizeEmail",1],[283,"call","GetPrimaryEmailAddress",1],[299,"call","NormalizeEmail",1],[299,"call","GetSecondaryEmailAddress",1],[300,"call","GetJsonValue",2],[301,"call","GetJsonValue",2],[302,"call","GetJsonValue",2],[303,"call","GetJsonValue",2],[306,"call","GetJsonValue",2],[307,"call","GetJsonValue",2],[310,"call","GetJsonValue",2],[311,"call","GetJsonValue",2],[312,"call","GetJsonValue",2],[316,"call","GetBusinessPhone",1],[317,"call","GetHomePhone",1],[319,"call","GetJsonValue",2],[321,"call","GetDateTimeValue",2],[322,"call","GetDateTimeValue",2],[325,"call","ParseAddressFields",2],[328,"call","GetCategoriesAsText",1],[330,"write",7122,"Insert"]]},{"name":"ParseAddressFields","line":334,"kind":"procedure","access":"local","params":2,"steps":[[347,"call","GetJsonValue",2],[348,"call","GetJsonValue",2],[349,"call","GetJsonValue",2],[350,"call","GetJsonValue",2],[351,"call","GetJsonValue",2]]},{"name":"GetPrimaryEmailAddress","line":364,"kind":"procedure","access":"local","params":1,"steps":[[371,"call","GetJsonValue",2]]},{"name":"HandleErrorResponse","line":428,"kind":"procedure","access":"local","params":2,"steps":[[439,"call","GetJsonValue",2],[440,"call","GetJsonValue",2],[441,"call","getTracecat",0]]},{"name":"GetDeltaUrl","line":466,"kind":"procedure","access":"local","params":1,"steps":[[476,"ext","table",7121,"GetDeltaUrl",0]]},{"name":"IsApprovedGraphRequestUri","line":480,"kind":"procedure","access":"local","params":1,"steps":[[487,"ext","codeunit",3060,"ValidateIntegrationURL",2]]},{"name":"GetSecondaryEmailAddress","line":490,"kind":"procedure","access":"local","params":1,"steps":[[503,"call","GetJsonValue",2]]},{"name":"CompareAndQueueContacts","line":532,"kind":"procedure","access":"local","params":4,"steps":[[549,"call","NormalizeEmail",1],[550,"call","NormalizeEmail",1],[553,"call","NormalizeEmail",1],[553,"call","ContactAlreadyInTempQueue",1],[557,"ext","table",7013,"CopyFromBCContact",2],[558,"call","NormalizeEmail",1],[559,"write",7013,"Insert"],[570,"call","NormalizeEmail",1],[570,"call","ContactAlreadyInTempQueue",1],[574,"ext","table",7013,"CopyFromO365Contact",2],[575,"write",7013,"Insert"],[576,"call","NormalizeEmail",1]]},{"name":"ContactAlreadyInTempQueue","line":582,"kind":"procedure","access":"local","params":1,"steps":[[584,"call","NormalizeEmail",1]]},{"name":"GetContactFolders","line":594,"kind":"procedure","params":2,"steps":[[610,"write",7101,"DeleteAll"],[615,"call","getTracecat",0],[616,"call","SetupHttpClientHeaders",2],[620,"call","getTracecat",0],[623,"call","getTracecat",0],[637,"call","GetJsonValue",2],[638,"call","GetJsonValue",2],[639,"call","GetJsonValue",2],[645,"write",7101,"Insert"],[653,"write",7101,"Insert"],[656,"call","getTracecat",0],[657,"call","HandleErrorResponse",2]]},{"name":"CreateFolderinO365","line":675,"kind":"procedure","params":3,"steps":[[694,"call","SetupHttpClientHeaders",2],[700,"call","getTracecat",0],[701,"call","GetJsonValue",2],[702,"call","GetJsonValue",2],[704,"write",7101,"DeleteAll"],[708,"write",7101,"Insert"],[712,"write",7101,"Insert"],[715,"call","getTracecat",0],[717,"call","HandleErrorResponse",2]]}]}