{"title":"Codeunit 5360 CDS Int. Table Couple, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/5360-cds-int-table-couple/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":5360,"name":"CDS Int. Table Couple","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/5360-cds-int-table-couple/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/5360-cds-int-table-couple/source/","path":"src/Layers/W1/BaseApp/Integration/Dataverse/CDSIntTableCouple.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:5340":{"name":"CRM Integration Table Synch.","url":"https://jonas-paprotka.de/ref/codeunit/5340-crm-integration-table-synch/"},"codeunit:5335":{"name":"Integration Table Synch.","url":"https://jonas-paprotka.de/ref/codeunit/5335-integration-table-synch/"},"table:5373":{"name":"CRM Full Synch. Review Line","url":"https://jonas-paprotka.de/ref/table/5373-crm-full-synch-review-line/"},"table:5336":{"name":"Integration Field Mapping","url":"https://jonas-paprotka.de/ref/table/5336-integration-field-mapping/"},"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:5330":{"name":"CRM Integration Management","url":"https://jonas-paprotka.de/ref/codeunit/5330-crm-integration-management/"},"table:5331":{"name":"CRM Integration Record","url":"https://jonas-paprotka.de/ref/table/5331-crm-integration-record/"},"table:5330":{"name":"CRM Connection Setup","url":"https://jonas-paprotka.de/ref/table/5330-crm-connection-setup/"}},"procs":[{"name":"OnRun","line":14,"kind":"trigger","steps":[[19,"event","OnBeforeRun",0],[23,"ext","codeunit",5340,"InitConnection",0],[24,"ext","codeunit",5340,"TestConnection",0],[26,"call","PerformScheduledCoupling",1],[28,"ext","codeunit",5340,"CloseConnection",1]]},{"name":"PerformScheduledCoupling","line":50,"kind":"procedure","access":"internal","params":1,"steps":[[56,"ext","codeunit",5335,"BeginIntegrationCoupleJob",3],[59,"ext","table",5373,"FullSynchStarted",3],[61,"ext","table",5373,"FullSynchStarted",3],[63,"call","CoupleRecords",2],[64,"ext","codeunit",5335,"EndIntegrationSynchJob",0],[67,"ext","table",5373,"FullSynchFinished",2],[69,"ext","table",5373,"FullSynchFinished",2]]},{"name":"CoupleRecords","line":73,"kind":"procedure","access":"local","params":2,"steps":[[112,"write",5336,"Insert"],[117,"call","GetMappingNameWithParent",1],[118,"ext","codeunit",5335,"LogMatchBasedCouplingError",2],[118,"ext","table",5335,"GetUserFriendlyMappingName",0],[129,"ext","codeunit",5336,"SplitLocalTableFilter",2],[133,"ext","codeunit",5330,"FindCoupledToCRMField",2],[145,"ext","table",5331,"IsIntegrationIdCoupled",2],[146,"call","GetSingleMatchAlreadyCoupledTelemetryErrorMessage",2],[151,"ext","table",5335,"SetIntRecordRefFilter",1],[167,"event","OnBeforeSetMatchingFilter",0],[195,"call","GetNoMatchFoundTelemetryErrorMessage",2],[202,"ext","table",5331,"IsCRMRecordRefCoupled",1],[203,"call","GetSingleMatchAlreadyCoupledTelemetryErrorMessage",2],[207,"ext","codeunit",5335,"Couple",2],[217,"call","GetMultipleMatchesFoundTelemetryErrorMessage",2],[234,"call","ShouldCreateNewRecordsInCaseOfNoMatch",1],[236,"ext","codeunit",5330,"CreateNewRecordsInCRM",1],[238,"ext","codeunit",5335,"UpdateSynchJobCounters",2],[239,"ext","codeunit",5335,"LogSynchError",4],[239,"call","GetNoMatchFoundErrorMessage",1],[244,"call","SynchronizeCoupledRecords",3],[246,"call","GetMappingNameWithParent",1]]},{"name":"ShouldCreateNewRecordsInCaseOfNoMatch","line":249,"kind":"procedure","access":"local","params":1,"steps":[[255,"event","OnShouldCreateNewRecordInCaseOfNoMatch",0],[263,"ext","table",5330,"IsBidirectionalSalesOrderIntEnabled",0]]},{"name":"SynchronizeCoupledRecords","line":269,"kind":"procedure","access":"local","params":3,"steps":[[275,"call","GetMappingNameWithParent",1],[279,"call","GetMappingNameWithParent",1],[285,"call","GetMappingNameWithParent",1],[292,"call","GetMappingNameWithParent",1],[293,"ext","codeunit",5330,"EnqueueSyncJob",5]]},{"name":"GetNoMatchFoundErrorMessage","line":296,"kind":"procedure","access":"local","params":1,"steps":[[298,"call","GetDataverseOrgURL",0]]},{"name":"GetNoMatchFoundTelemetryErrorMessage","line":301,"kind":"procedure","access":"local","params":2,"steps":[[305,"call","GetMatchingFieldNameList",2],[306,"call","GetDataverseOrgURL",0]]},{"name":"GetMultipleMatchesFoundTelemetryErrorMessage","line":309,"kind":"procedure","access":"local","params":2,"steps":[[313,"call","GetMatchingFieldNameList",2],[314,"call","GetDataverseOrgURL",0]]},{"name":"GetSingleMatchAlreadyCoupledTelemetryErrorMessage","line":317,"kind":"procedure","access":"local","params":2,"steps":[[321,"call","GetMatchingFieldNameList",2],[322,"call","GetDataverseOrgURL",0]]},{"name":"GetDataverseOrgURL","line":343,"kind":"procedure","access":"local","params":0,"steps":[[351,"ext","table",5330,"IsEnabled",0]]}]}