{"title":"Codeunit 1798 Data Migration Mgt., extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/1798-data-migration-mgt/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":1798,"name":"Data Migration Mgt.","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/1798-data-migration-mgt/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/1798-data-migration-mgt/source/","path":"src/Layers/W1/BaseApp/System/DataMigration/DataMigrationMgt.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:6100":{"name":"Data Migration Facade","url":"https://jonas-paprotka.de/ref/codeunit/6100-data-migration-facade/"},"codeunit:1812":{"name":"Data Migration Del G/L Account","url":"https://jonas-paprotka.de/ref/codeunit/1812-data-migration-del-g-l-account/"},"table:1797":{"name":"Data Migration Error","url":"https://jonas-paprotka.de/ref/table/1797-data-migration-error/"},"codeunit:6101":{"name":"Data Migration Status Facade","url":"https://jonas-paprotka.de/ref/codeunit/6101-data-migration-status-facade/"},"table:1798":{"name":"Data Migration Parameters","url":"https://jonas-paprotka.de/ref/table/1798-data-migration-parameters/"},"table:1799":{"name":"Data Migration Status","url":"https://jonas-paprotka.de/ref/table/1799-data-migration-status/"},"codeunit:1798":{"name":"Data Migration Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/1798-data-migration-mgt/"},"table:472":{"name":"Job Queue Entry","url":"https://jonas-paprotka.de/ref/table/472-job-queue-entry/"},"page:1808":{"name":"Data Migration Wizard","url":"https://jonas-paprotka.de/ref/page/1808-data-migration-wizard/"},"table:1518":{"name":"My Notifications","url":"https://jonas-paprotka.de/ref/table/1518-my-notifications/"},"page:1799":{"name":"Data Migration Overview","url":"https://jonas-paprotka.de/ref/page/1799-data-migration-overview/"},"page:1798":{"name":"Data Migration About","url":"https://jonas-paprotka.de/ref/page/1798-data-migration-about/"}},"procs":[{"name":"OnRun","line":16,"kind":"trigger","steps":[[23,"call","EnableDataMigrationNotificationForAllUsers",0],[28,"event","OnBeforeMigrationStarted",0],[32,"ext","codeunit",6100,"OnFillStagingTables",0],[41,"run","codeunit",1812],[42,"ext","table",1797,"CreateEntryNoStagingTable",2],[44,"call","CheckAbortRequestedAndMigrateEntity",4],[50,"call","CheckAbortRequestedAndMigrateEntity",4],[54,"call","CheckAbortRequestedAndMigrateEntity",4],[58,"call","CheckAbortRequestedAndMigrateEntity",4],[62,"call","CheckAbortAndMigrateRemainingEntities",2],[63,"event","OnCreatePostMigrationData",0],[64,"event","OnValidateMigration",0],[68,"event","OnAfterMigrationFinished",0]]},{"name":"HandleEntityMigration","line":100,"kind":"procedure","access":"local","params":3,"steps":[[106,"call","StagingTableEntityMigration",3],[108,"ext","codeunit",6101,"UpdateLineStatus",3],[110,"ext","table",1797,"ClearEntryNoStagingTable",2],[116,"ext","codeunit",6101,"IncrementMigratedRecordCount",3],[120,"ext","codeunit",6101,"UpdateLineStatus",3],[123,"ext","table",1797,"CreateEntryNoStagingTable",2],[125,"ext","codeunit",6101,"UpdateLineStatus",3]]},{"name":"StagingTableEntityMigration","line":134,"kind":"procedure","access":"local","params":3,"steps":[[144,"ext","codeunit",6101,"UpdateLineStatus",3],[153,"ext","table",1797,"FindEntry",3],[164,"write",1798,"Insert"],[166,"ext","table",1797,"ClearEntry",3],[173,"call","ProcessBatch",4],[175,"write",1798,"DeleteAll"],[184,"call","ProcessBatch",4],[190,"ext","codeunit",6101,"UpdateLineStatus",3],[194,"ext","codeunit",6101,"UpdateLineStatus",3]]},{"name":"ProcessBatch","line":199,"kind":"procedure","access":"local","params":4,"steps":[[207,"ext","codeunit",6101,"IncrementMigratedRecordCount",3],[215,"write",1798,"DeleteAll"],[218,"write",1798,"Insert"],[222,"ext","codeunit",6101,"IncrementMigratedRecordCount",3],[226,"ext","table",1797,"CreateEntry",3]]},{"name":"CheckAbortRequestedAndMigrateEntity","line":245,"kind":"procedure","access":"local","params":4,"steps":[[250,"call","SetAbortStatus",1],[251,"event","OnAfterMigrationFinished",0],[256,"call","HandleEntityMigration",3]]},{"name":"CheckAbortAndMigrateRemainingEntities","line":259,"kind":"procedure","access":"local","params":2,"steps":[[264,"call","SetAbortStatus",1],[265,"event","OnAfterMigrationFinished",0],[277,"call","HandleEntityMigration",3]]},{"name":"SetAbortStatus","line":286,"kind":"procedure","params":1,"steps":[[293,"write",1799,"Modify",1]]},{"name":"OnBeforeMigrationStartedSubscriber","line":321,"kind":"procedure","access":"local","params":3,"steps":[[325,"ext","codeunit",1798,"SetStartTime",1]]},{"name":"StartMigration","line":368,"kind":"procedure","params":2,"steps":[[377,"call","CheckMigrationInProgress",1],[381,"event","OnBeforeStartMigration",0],[384,"call","CheckDataAlreadyExist",2],[394,"write",1797,"DeleteAll"],[406,"ext","table",472,"ScheduleJobQueueEntryWithParameters",3],[411,"run","codeunit",1798]]},{"name":"CheckMigrationInProgress","line":420,"kind":"procedure","params":1,"steps":[[426,"call","GetMigrationStatus",0]]},{"name":"CheckDataAlreadyExist","line":476,"kind":"procedure","access":"local","params":2,"steps":[[482,"call","ThrowErrorIfTableNotEmpty",3],[483,"call","ThrowErrorIfTableNotEmpty",3],[484,"call","ThrowErrorIfTableNotEmpty",3]]},{"name":"StartDataMigrationWizardFromNotification","line":501,"kind":"procedure","params":1,"steps":[[503,"run","page",1808]]},{"name":"ShowDataMigrationRelatedGlobalNotifications","line":506,"kind":"procedure","params":0,"steps":[[512,"call","IsGlobalNotificationEnabled",0],[518,"call","GetGlobalNotificationId",0],[519,"call","GetMigrationStatus",0],[533,"call","CheckForEntitiesToBePosted",0]]},{"name":"IsGlobalNotificationEnabled","line":580,"kind":"procedure","access":"local","params":0,"steps":[[584,"ext","table",1518,"IsEnabled",1],[584,"call","GetGlobalNotificationId",0]]},{"name":"OnInitializingNotificationWithDefaultState","line":588,"kind":"procedure","access":"local","params":0,"steps":[[592,"ext","table",1518,"InsertDefault",4],[592,"call","GetGlobalNotificationId",0],[593,"call","InsertDefaultCustomerContactNotification",1],[594,"call","InsertDefaultVendorContactNotification",1],[595,"call","InsertDefaultCustomerListEmptyNotification",1],[596,"call","InsertDefaultVendorListEmptyNotification",1],[597,"call","InsertDefaultItemListEmptyNotification",1]]},{"name":"ShowDataMigrationOverviewFromNotification","line":600,"kind":"procedure","params":1,"steps":[[602,"run","page",1799]]},{"name":"IsMigrationInProgress","line":605,"kind":"procedure","params":0,"steps":[[607,"call","GetMigrationStatus",0]]},{"name":"ShowMoreInfoPage","line":610,"kind":"procedure","params":1,"steps":[[612,"run","page",1798],[613,"call","ShowDataMigrationOverviewFromNotification",1]]},{"name":"CheckForEntitiesToBePosted","line":616,"kind":"procedure","params":0,"steps":[[627,"call","DestTableHasAnyTransactions",2]]},{"name":"DestTableHasAnyTransactions","line":632,"kind":"procedure","params":2,"steps":[[640,"ext","codeunit",6100,"OnFindBatchForVendorTransactions",2],[650,"ext","codeunit",6100,"OnFindBatchForCustomerTransactions",2],[660,"ext","codeunit",6100,"OnFindBatchForItemTransactions",2],[668,"ext","codeunit",6100,"OnFindBatchForAccountTransactions",2]]},{"name":"DisableDataMigrationRelatedGlobalNotifications","line":691,"kind":"procedure","params":1,"steps":[[695,"ext","table",1518,"Disable",1],[695,"call","GetGlobalNotificationId",0],[696,"ext","table",1518,"InsertDefault",4],[696,"call","GetGlobalNotificationId",0]]},{"name":"EnableDataMigrationNotificationForAllUsers","line":699,"kind":"procedure","access":"local","params":0,"steps":[[703,"call","GetGlobalNotificationId",0],[707,"write",1518,"Modify",1]]},{"name":"InsertDefaultCustomerContactNotification","line":711,"kind":"procedure","params":1,"steps":[[715,"ext","table",1518,"InsertDefault",4],[716,"call","GetCustomerContactNotificationId",0]]},{"name":"InsertDefaultVendorContactNotification","line":719,"kind":"procedure","params":1,"steps":[[723,"ext","table",1518,"InsertDefault",4],[724,"call","GetVendorContactNotificationId",0]]},{"name":"InsertDefaultCustomerListEmptyNotification","line":727,"kind":"procedure","params":1,"steps":[[731,"ext","table",1518,"InsertDefault",4],[732,"call","GetCustomerListEmptyNotificationId",0]]},{"name":"InsertDefaultVendorListEmptyNotification","line":735,"kind":"procedure","params":1,"steps":[[739,"ext","table",1518,"InsertDefault",4],[740,"call","GetVendorListEmptyNotificationId",0]]},{"name":"InsertDefaultItemListEmptyNotification","line":743,"kind":"procedure","params":1,"steps":[[747,"ext","table",1518,"InsertDefault",4],[748,"call","GetItemListEmptyNotificationId",0]]},{"name":"UpdateMigrationStatus","line":751,"kind":"procedure","params":1,"steps":[[764,"validate",1799,"Status"],[765,"write",1799,"Modify",1]]},{"name":"CheckIfMigrationIsCompleted","line":769,"kind":"procedure","params":1,"steps":[[783,"ext","codeunit",6100,"OnMigrationCompleted",1]]}]}