{"title":"Codeunit 5355 CRM Notes Synch Job, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/5355-crm-notes-synch-job/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":5355,"name":"CRM Notes Synch Job","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/5355-crm-notes-synch-job/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/5355-crm-notes-synch-job/source/","path":"src/Layers/W1/BaseApp/Integration/D365Sales/CRMNotesSynchJob.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:5344":{"name":"CRM Product Name","url":"https://jonas-paprotka.de/ref/codeunit/5344-crm-product-name/"},"table:5330":{"name":"CRM Connection Setup","url":"https://jonas-paprotka.de/ref/table/5330-crm-connection-setup/"},"codeunit:5335":{"name":"Integration Table Synch.","url":"https://jonas-paprotka.de/ref/codeunit/5335-integration-table-synch/"},"codeunit:447":{"name":"Record Link Management","url":"https://jonas-paprotka.de/ref/codeunit/447-record-link-management/"},"table:5385":{"name":"CRM Annotation","url":"https://jonas-paprotka.de/ref/table/5385-crm-annotation/"},"table:5392":{"name":"CRM Annotation Coupling","url":"https://jonas-paprotka.de/ref/table/5392-crm-annotation-coupling/"},"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:5391":{"name":"CRM Annotation Buffer","url":"https://jonas-paprotka.de/ref/table/5391-crm-annotation-buffer/"},"codeunit:5343":{"name":"CRM Sales Order to Sales Order","url":"https://jonas-paprotka.de/ref/codeunit/5343-crm-sales-order-to-sales-order/"},"table:2000000068":{"name":"Record Link","url":"https://jonas-paprotka.de/ref/table/2000000068-record-link/"}},"procs":[{"name":"OnRun","line":18,"kind":"trigger","steps":[[20,"call","UpdateOrders",1]]},{"name":"UpdateOrders","line":29,"kind":"procedure","access":"local","params":1,"steps":[[36,"ext","codeunit",5344,"FULL",0],[39,"ext","table",5330,"RegisterConnectionWithName",1],[41,"ext","table",5330,"GetDefaultCRMConnection",1],[43,"call","UpdateSalesOrderNotes",1],[45,"ext","table",5330,"UnregisterConnectionWithName",1]]},{"name":"UpdateSalesOrderNotes","line":48,"kind":"procedure","access":"local","params":1,"steps":[[63,"ext","codeunit",5335,"BeginIntegrationSynchJob",3],[65,"ext","codeunit",5335,"BeginIntegrationSynchJobLoging",4],[74,"call","CreateAnnotationsForCreatedNotes",0],[75,"call","CreateNotesForCreatedAnnotations",1],[76,"call","ModifyNotesForModifiedAnnotations",1],[78,"ext","codeunit",5335,"UpdateSynchJobCounters",2],[79,"ext","codeunit",5335,"UpdateSynchJobCounters",2],[80,"ext","codeunit",5335,"EndIntegrationSynchJobWithMsg",1],[80,"call","GetOrderNotesUpdateFinalMessage",0]]},{"name":"CreateCRMAnnotation","line":109,"kind":"procedure","access":"local","params":2,"steps":[[120,"ext","codeunit",447,"ReadNote",1],[130,"write",5385,"Insert"],[133,"ext","table",5392,"CoupleRecordLinkToCRMAnnotation",2]]},{"name":"FindCoupledCRMSalesOrder","line":141,"kind":"procedure","access":"local","params":2,"steps":[[146,"ext","codeunit",5330,"IsCRMIntegrationEnabled",0],[149,"ext","table",5331,"FindIDFromRecordID",2]]},{"name":"CreateAnnotationsForCreatedNotes","line":159,"kind":"procedure","params":0,"steps":[[170,"write",5391,"Insert"],[175,"call","ProcessCRMAnnotationBufferEntry",1]]},{"name":"CreateNotesForCreatedAnnotations","line":180,"kind":"procedure","params":1,"steps":[[189,"call","CreateAndCoupleNote",1]]},{"name":"ModifyNotesForModifiedAnnotations","line":194,"kind":"procedure","params":1,"steps":[[203,"call","ModifyNote",1]]},{"name":"CreateAndCoupleNote","line":207,"kind":"procedure","access":"local","params":1,"steps":[[216,"ext","table",5331,"FindRecordIDFromID",3],[225,"ext","table",5392,"FindByCRMId",1],[228,"ext","codeunit",5343,"CreateNote",3],[229,"ext","table",5392,"CoupleRecordLinkToCRMAnnotation",2]]},{"name":"ModifyNote","line":233,"kind":"procedure","access":"local","params":1,"steps":[[243,"ext","table",5331,"FindRecordIDFromID",3],[246,"ext","table",5392,"FindByCRMId",1],[258,"ext","table",5392,"ExtractNoteText",1],[259,"ext","codeunit",447,"ReadNote",1],[260,"ext","codeunit",447,"WriteNote",2],[261,"write",2000000068,"Modify",1],[264,"write",5392,"Modify"]]},{"name":"ProcessCRMAnnotationBufferEntry","line":271,"kind":"procedure","access":"local","params":1,"steps":[[281,"call","DeleteCRMAnnotationBufferEntry",1],[288,"call","FindCoupledCRMSalesOrder",2],[289,"call","DeleteCRMAnnotationBufferEntry",1],[294,"call","DeleteCRMAnnotationBufferEntry",1],[299,"call","DeleteCRMAnnotationBufferEntry",1],[303,"call","CreateCRMAnnotation",2],[304,"call","DeleteCRMAnnotationBufferEntry",1]]},{"name":"DeleteCRMAnnotationBufferEntry","line":308,"kind":"procedure","access":"local","params":1,"steps":[[313,"write",5391,"Delete"]]},{"name":"CreateCRMAnnotationBufferOnAfterInsertRecordLink","line":317,"kind":"procedure","access":"local","params":2,"steps":[[347,"ext","table",5331,"FindIDFromRecordID",2],[350,"call","CreateCRMAnnotationBufferEntry",3]]},{"name":"CreateCRMAnnotationBufferEntry","line":353,"kind":"procedure","access":"local","params":3,"steps":[[362,"write",5391,"Insert",1]]}]}