{"title":"Codeunit 104040 Upgrade Profiles V2, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/104040-upgrade-profiles-v2/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":104040,"name":"Upgrade Profiles V2","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/104040-upgrade-profiles-v2/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/104040-upgrade-profiles-v2/source/","path":"src/Layers/W1/BaseApp/OtherCapabilities/Upgrade/UpgradeProfilesV2.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:6060":{"name":"Hybrid Deployment","url":"https://jonas-paprotka.de/ref/codeunit/6060-hybrid-deployment/"},"codeunit:9999":{"name":"Upgrade Tag","url":"https://jonas-paprotka.de/ref/codeunit/9999-upgrade-tag/"},"codeunit:9998":{"name":"Upgrade Tag Definitions","url":"https://jonas-paprotka.de/ref/codeunit/9998-upgrade-tag-definitions/"},"table:8627":{"name":"Config. Setup","url":"https://jonas-paprotka.de/ref/table/8627-config-setup/"},"table:2000000073":{"name":"User Personalization","url":"https://jonas-paprotka.de/ref/table/2000000073-user-personalization/"},"table:9178":{"name":"Application Area Setup","url":"https://jonas-paprotka.de/ref/table/9178-application-area-setup/"},"table:2000000177":{"name":"Tenant Profile","url":"https://jonas-paprotka.de/ref/table/2000000177-tenant-profile/"}},"procs":[{"name":"OnUpgradePerCompany","line":21,"kind":"trigger","steps":[[29,"ext","codeunit",6060,"VerifyCanStartUpgrade",1],[32,"ext","codeunit",9999,"HasUpgradeTag",2],[32,"ext","codeunit",9998,"GetUpdateProfileReferencesForCompanyTag",0],[37,"call","UpdateConfigSetup",0],[41,"ext","codeunit",9999,"SetUpgradeTag",1],[41,"ext","codeunit",9998,"GetUpdateProfileReferencesForCompanyTag",0]]},{"name":"OnUpgradePerDatabase","line":44,"kind":"trigger","steps":[[46,"call","UpgradeProfileReferences",0]]},{"name":"UpgradeProfileReferences","line":49,"kind":"procedure","access":"local","params":0,"steps":[[56,"ext","codeunit",9999,"HasUpgradeTag",1],[56,"ext","codeunit",9998,"GetUpdateProfileReferencesForDatabaseTag",0],[61,"call","UpdateApplicationAreaSetup",0],[62,"call","UpdateUserPersonalizations",0],[66,"ext","codeunit",9999,"SetUpgradeTag",1],[66,"ext","codeunit",9998,"GetUpdateProfileReferencesForDatabaseTag",0]]},{"name":"UpdateConfigSetup","line":71,"kind":"procedure","access":"local","params":0,"steps":[[83,"call","FindTenantProfileFromAppProfile",2],[87,"write",8627,"Modify"],[90,"call","SendFailedToUpdateProfileReferenceTag",3],[97,"call","SendProfileReferenceUpdatedTag",3]]},{"name":"UpdateUserPersonalizations","line":100,"kind":"procedure","access":"local","params":0,"steps":[[112,"call","FindTenantProfileFromAppProfile",2],[116,"write",2000000073,"Modify"],[119,"call","SendFailedToUpdateProfileReferenceTag",3],[126,"call","SendProfileReferenceUpdatedTag",3]]},{"name":"UpdateApplicationAreaSetup","line":129,"kind":"procedure","access":"local","params":0,"steps":[[141,"call","ShouldUpdateProfileIdForApplicationAreaSetup",1],[142,"call","FindTenantProfileFromAppProfile",2],[144,"write",9178,"Modify"],[147,"call","SendFailedToUpdateProfileReferenceTag",3],[154,"call","SendProfileReferenceUpdatedTag",3]]},{"name":"FindTenantProfileFromAppProfile","line":159,"kind":"procedure","access":"local","params":2,"steps":[[162,"call","MatchSystemProfileToBaseAppTenantProfile",2],[167,"call","MatchSystemProfileWithAlreadyCreatedTenantProfile",2],[172,"call","CreateTenantProfileFromAppProfileId",2]]},{"name":"CreateTenantProfileFromAppProfileId","line":286,"kind":"procedure","access":"local","params":2,"steps":[[300,"write",2000000177,"Insert"]]}]}