{"title":"Codeunit 5335 Integration Table Synch., extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/5335-integration-table-synch/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":5335,"name":"Integration Table Synch.","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/5335-integration-table-synch/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/5335-integration-table-synch/source/","path":"src/Layers/W1/BaseApp/Integration/SynchEngine/IntegrationTableSynch.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:5335":{"name":"Integration Table Mapping","url":"https://jonas-paprotka.de/ref/table/5335-integration-table-mapping/"},"codeunit:5336":{"name":"Integration Record Synch.","url":"https://jonas-paprotka.de/ref/codeunit/5336-integration-record-synch/"},"codeunit:5345":{"name":"Integration Rec. Synch. Invoke","url":"https://jonas-paprotka.de/ref/codeunit/5345-integration-rec-synch-invoke/"},"table:5338":{"name":"Integration Synch. Job","url":"https://jonas-paprotka.de/ref/table/5338-integration-synch-job/"},"table:5337":{"name":"Temp Integration Field Mapping","url":"https://jonas-paprotka.de/ref/table/5337-temp-integration-field-mapping/"},"codeunit:5357":{"name":"Int. Rec. Uncouple Invoke","url":"https://jonas-paprotka.de/ref/codeunit/5357-int-rec-uncouple-invoke/"},"codeunit:5361":{"name":"Int. Rec. Couple Invoke","url":"https://jonas-paprotka.de/ref/codeunit/5361-int-rec-couple-invoke/"},"table:5334":{"name":"CRM Option Mapping","url":"https://jonas-paprotka.de/ref/table/5334-crm-option-mapping/"},"codeunit:5347":{"name":"Integration Rec. Delete Invoke","url":"https://jonas-paprotka.de/ref/codeunit/5347-integration-rec-delete-invoke/"},"table:5339":{"name":"Integration Synch. Job Errors","url":"https://jonas-paprotka.de/ref/table/5339-integration-synch-job-errors/"},"codeunit:5338":{"name":"Integration Record Management","url":"https://jonas-paprotka.de/ref/codeunit/5338-integration-record-management/"},"codeunit:5364":{"name":"Int. Option Synch. Invoke","url":"https://jonas-paprotka.de/ref/codeunit/5364-int-option-synch-invoke/"}},"procs":[{"name":"BeginIntegrationUncoupleJob","line":40,"kind":"procedure","params":3,"steps":[[42,"call","BeginIntegrationSynchJob",4]]},{"name":"BeginIntegrationCoupleJob","line":45,"kind":"procedure","params":3,"steps":[[47,"call","BeginIntegrationSynchJob",4]]},{"name":"BeginIntegrationSynchJob","line":50,"kind":"procedure","access":"local","params":4,"steps":[[55,"call","EnsureState",1],[62,"ext","table",5335,"GetJobLogEntryNo",0],[64,"call","DetermineSynchDirection",2],[68,"call","InitIntegrationSynchJob",1],[71,"event","OnAfterInitSynchJob",0],[73,"call","FinishIntegrationSynchJob",1]]},{"name":"BeginIntegrationSynchJobLoging","line":77,"kind":"procedure","params":4,"steps":[[79,"call","EnsureState",1],[90,"call","InitIntegrationSynchJob",1],[93,"event","OnAfterInitSynchJob",0]]},{"name":"CheckTransferFields","line":97,"kind":"procedure","params":5,"steps":[[105,"event","OnBeforeCheckTransferFields",0],[113,"call","BuildTempIntegrationFieldMapping",3],[114,"ext","codeunit",5336,"SetFieldMapping",1],[115,"ext","codeunit",5345,"SetContext",8],[119,"ext","codeunit",5345,"CheckTransferFields",6]]},{"name":"Synchronize","line":122,"kind":"procedure","params":4,"steps":[[129,"event","OnBeforeSynchronize",1],[133,"call","DoesSourceMatchMapping",1],[134,"call","FinishIntegrationSynchJob",1],[136,"ext","table",5335,"GetName",0],[140,"call","EnsureState",1],[148,"write",5338,"Modify",1],[150,"call","BuildTempIntegrationFieldMapping",3],[163,"call","IsRecordSkipped",2],[166,"ext","codeunit",5336,"SetFieldMapping",1],[167,"ext","codeunit",5345,"SetContext",8],[171,"run","codeunit",5345],[173,"call","LogSynchError",4],[174,"ext","codeunit",5345,"MarkIntegrationRecordAsFailed",5],[176,"call","IncrementSynchJobCounters",1],[179,"ext","codeunit",5345,"GetContext",5],[182,"call","IncrementSynchJobCounters",1]]},{"name":"Uncouple","line":188,"kind":"procedure","params":2,"steps":[[197,"event","OnBeforeUncouple",1],[201,"call","EnsureState",1],[207,"write",5338,"Modify",1],[209,"write",5337,"DeleteAll"],[217,"ext","codeunit",5336,"SetFieldMapping",1],[218,"ext","codeunit",5357,"SetContext",8],[221,"run","codeunit",5357],[223,"call","LogSynchError",3],[226,"ext","codeunit",5357,"GetContext",6],[229,"call","IncrementSynchJobCounters",1],[230,"call","IncrementSynchJobCounters",1]]},{"name":"Couple","line":235,"kind":"procedure","params":2,"steps":[[244,"event","OnBeforeCouple",1],[248,"call","EnsureState",1],[254,"write",5338,"Modify",1],[256,"write",5337,"DeleteAll"],[264,"ext","codeunit",5336,"SetFieldMapping",1],[265,"ext","codeunit",5361,"SetContext",8],[268,"run","codeunit",5361],[270,"call","LogSynchError",3],[273,"ext","codeunit",5361,"GetContext",6],[276,"call","IncrementSynchJobCounters",1],[277,"call","IncrementSynchJobCounters",1]]},{"name":"CoupleOption","line":283,"kind":"procedure","params":2,"steps":[[288,"call","EnsureState",1],[294,"write",5338,"Modify",1],[296,"write",5337,"DeleteAll"],[304,"ext","table",5334,"InsertRecord",3],[304,"ext","table",5334,"GetRecordRefOptionId",1],[304,"ext","table",5334,"GetRecordRefOptionValue",1],[306,"call","LogSynchError",3],[310,"call","IncrementSynchJobCounters",1]]},{"name":"LogMatchBasedCouplingError","line":314,"kind":"procedure","params":2,"steps":[[318,"call","EnsureState",1],[324,"write",5338,"Modify",1],[326,"write",5337,"DeleteAll"],[332,"call","LogSynchError",3]]},{"name":"Delete","line":335,"kind":"procedure","params":1,"steps":[[341,"call","EnsureState",1],[350,"write",5338,"Modify",1],[354,"ext","codeunit",5347,"SetContext",4],[357,"run","codeunit",5347],[358,"call","LogSynchError",3],[361,"ext","codeunit",5347,"GetContext",3],[364,"call","IncrementSynchJobCounters",1]]},{"name":"EndIntegrationSynchJob","line":369,"kind":"procedure","params":0,"steps":[[371,"call","EndIntegrationSynchJobWithMsg",0]]},{"name":"EndIntegrationSynchJobWithMsg","line":374,"kind":"procedure","params":1,"steps":[[377,"call","FinishIntegrationSynchJob",1]]},{"name":"DetermineSynchDirection","line":409,"kind":"procedure","access":"local","params":2,"steps":[[416,"event","OnDetermineSynchDirection",1]]},{"name":"InitIntegrationSynchJob","line":444,"kind":"procedure","access":"local","params":1,"steps":[[448,"call","CreateIntegrationSynchJobEntry",1]]},{"name":"FinishIntegrationSynchJob","line":453,"kind":"procedure","access":"local","params":1,"steps":[[458,"write",5338,"Modify",1]]},{"name":"CreateIntegrationSynchJobEntry","line":462,"kind":"procedure","access":"local","params":1,"steps":[[465,"call","InsertIntegrationSynchJobEntry",1],[468,"call","InsertIntegrationSynchJobEntry",1]]},{"name":"InsertIntegrationSynchJobEntry","line":471,"kind":"procedure","access":"local","params":1,"steps":[[477,"ext","table",5335,"GetName",0],[481,"write",5338,"Insert",1]]},{"name":"BuildTempIntegrationFieldMapping","line":486,"kind":"procedure","access":"local","params":3,"steps":[[498,"write",5337,"DeleteAll"],[516,"write",5337,"Insert"]]},{"name":"LogSynchError","line":525,"kind":"procedure","params":4,"steps":[[532,"call","IncrementSynchJobCounters",1],[538,"ext","table",5339,"LogSynchError",4]]},{"name":"IncrementSynchJobCounters","line":543,"kind":"procedure","params":1,"steps":[[545,"call","UpdateSynchJobCounters",2]]},{"name":"UpdateSynchJobCounters","line":548,"kind":"procedure","params":2,"steps":[[572,"write",5338,"Modify"]]},{"name":"IsRecordSkipped","line":586,"kind":"procedure","access":"local","params":2,"steps":[[590,"ext","codeunit",5338,"IsIntegrationRecordSkipped",3]]},{"name":"SynchronizeOption","line":593,"kind":"procedure","params":4,"steps":[[599,"event","OnBeforeSynchronizeOption",1],[603,"call","EnsureState",1],[611,"write",5338,"Modify",1],[623,"call","IsOptionSkipped",2],[626,"ext","codeunit",5364,"SetContext",6],[628,"run","codeunit",5364],[630,"call","LogSynchError",4],[631,"ext","codeunit",5364,"MarkOptionMappingAsFailed",4],[633,"call","IncrementSynchJobCounters",1],[636,"ext","codeunit",5364,"GetContext",4],[639,"call","IncrementSynchJobCounters",1]]},{"name":"IsOptionSkipped","line":645,"kind":"procedure","access":"local","params":2,"steps":[[649,"ext","table",5334,"IsOptionMappingSkipped",2]]}]}