{"title":"Codeunit 9057 Plan Upgrade, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/9057-plan-upgrade/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":9057,"name":"Plan Upgrade","app":"System Application","url":"https://jonas-paprotka.de/ref/codeunit/9057-plan-upgrade/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/9057-plan-upgrade/source/","path":"src/System Application/App/Azure AD Plan/src/PlanUpgrade.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:9999":{"name":"Upgrade Tag","url":"https://jonas-paprotka.de/ref/codeunit/9999-upgrade-tag/"},"codeunit:9058":{"name":"Plan Upgrade Tag","url":"https://jonas-paprotka.de/ref/codeunit/9058-plan-upgrade-tag/"},"codeunit:9027":{"name":"Plan Ids","url":"https://jonas-paprotka.de/ref/codeunit/9027-plan-ids/"},"codeunit:9822":{"name":"Plan Configuration Impl.","url":"https://jonas-paprotka.de/ref/codeunit/9822-plan-configuration-impl/"},"table:9004":{"name":"Plan","url":"https://jonas-paprotka.de/ref/table/9004-plan/"}},"procs":[{"name":"OnUpgradePerDatabase","line":23,"kind":"trigger","steps":[[25,"call","UpdateSubscriptionPlan",0],[26,"call","RenamePlansAndDeleteOldPlans",0],[27,"call","RenameTeamMemberPlan",0],[28,"call","RenameDevicePlan",0],[29,"call","AddPremiumPartnerSandbox",0],[30,"call","AddMicrosoft365",0],[31,"call","AddEssentialAttach",0],[32,"call","AddD365Admin",0],[33,"call","AddBCAdmin",0],[34,"call","AddDelegatedD365Admin",0],[36,"call","AddDefaultPlanConfigurations",0]]},{"name":"UpdateSubscriptionPlan","line":40,"kind":"procedure","access":"local","params":0,"steps":[[50,"ext","codeunit",9999,"HasUpgradeTag",1],[50,"ext","codeunit",9058,"GetAddDeviceISVEmbUpgradeTag",0],[53,"ext","codeunit",9027,"GetDeviceISVPlanId",0],[60,"call","CreatePlan",3],[64,"ext","codeunit",9999,"SetUpgradeTag",1],[64,"ext","codeunit",9058,"GetAddDeviceISVEmbUpgradeTag",0]]},{"name":"RenamePlansAndDeleteOldPlans","line":68,"kind":"procedure","access":"local","params":0,"steps":[[74,"ext","codeunit",9999,"HasUpgradeTag",1],[74,"ext","codeunit",9058,"GetRenamePlansUpgradeTag",0],[77,"call","RenameOrCreatePlan",2],[77,"ext","codeunit",9027,"GetEssentialAttachPlanId",0],[78,"call","RenameOrCreatePlan",2],[78,"ext","codeunit",9027,"GetEssentialISVPlanId",0],[79,"call","RenameOrCreatePlan",2],[79,"ext","codeunit",9027,"GetTeamMemberPlanId",0],[80,"call","RenameOrCreatePlan",2],[80,"ext","codeunit",9027,"GetPremiumPlanId",0],[81,"call","RenameOrCreatePlan",2],[81,"ext","codeunit",9027,"GetBasicFinancialsISVPlanId",0],[82,"call","RenameOrCreatePlan",2],[82,"ext","codeunit",9027,"GetEssentialPlanId",0],[83,"call","RenameOrCreatePlan",2],[83,"ext","codeunit",9027,"GetAccountantHubPlanId",0],[84,"call","RenameOrCreatePlan",2],[84,"ext","codeunit",9027,"GetDevicePlanId",0],[85,"call","RenameOrCreatePlan",2],[85,"ext","codeunit",9027,"GetTeamMemberISVPlanId",0],[86,"call","RenameOrCreatePlan",2],[86,"ext","codeunit",9027,"GetExternalAccountantPlanId",0],[87,"call","RenameOrCreatePlan",2],[87,"ext","codeunit",9027,"GetPremiumISVPlanId",0],[88,"call","RenameOrCreatePlan",2],[88,"ext","codeunit",9027,"GetViralSignupPlanId",0],[89,"call","RenameOrCreatePlan",2],[89,"ext","codeunit",9027,"GetDelegatedAdminPlanId",0],[90,"call","RenameOrCreatePlan",2],[90,"ext","codeunit",9027,"GetHelpDeskPlanId",0],[91,"call","RenameOrCreatePlan",2],[93,"call","DeletePlan",0],[94,"call","DeletePlan",0],[95,"call","DeletePlan",0],[96,"call","DeletePlan",0],[97,"call","DeletePlan",0],[101,"ext","codeunit",9999,"SetUpgradeTag",1],[101,"ext","codeunit",9058,"GetRenamePlansUpgradeTag",0]]},{"name":"RenameTeamMemberPlan","line":105,"kind":"procedure","access":"local","params":0,"steps":[[111,"ext","codeunit",9999,"HasUpgradeTag",1],[111,"ext","codeunit",9058,"GetRenameTeamMemberPlanUpgradeTag",0],[114,"call","RenameOrCreatePlan",2],[114,"ext","codeunit",9027,"GetTeamMemberPlanId",0],[116,"ext","codeunit",9999,"SetUpgradeTag",1],[116,"ext","codeunit",9058,"GetRenameTeamMemberPlanUpgradeTag",0]]},{"name":"RenameDevicePlan","line":120,"kind":"procedure","access":"local","params":0,"steps":[[126,"ext","codeunit",9999,"HasUpgradeTag",1],[126,"ext","codeunit",9058,"GetRenameDevicePlanUpgradeTag",0],[129,"call","RenameOrCreatePlan",2],[129,"ext","codeunit",9027,"GetDevicePlanId",0],[131,"ext","codeunit",9999,"SetUpgradeTag",1],[131,"ext","codeunit",9058,"GetRenameDevicePlanUpgradeTag",0]]},{"name":"AddPremiumPartnerSandbox","line":135,"kind":"procedure","access":"local","params":0,"steps":[[145,"ext","codeunit",9999,"HasUpgradeTag",1],[145,"ext","codeunit",9058,"GetPremiumPartnerSandboxUpgradeTag",0],[148,"ext","codeunit",9027,"GetPremiumPartnerSandboxPlanId",0],[155,"call","CreatePlan",3],[157,"ext","codeunit",9999,"SetUpgradeTag",1],[157,"ext","codeunit",9058,"GetPremiumPartnerSandboxUpgradeTag",0]]},{"name":"AddEssentialAttach","line":161,"kind":"procedure","access":"local","params":0,"steps":[[171,"ext","codeunit",9999,"HasUpgradeTag",1],[171,"ext","codeunit",9058,"GetEssentialAttachUpgradeTag",0],[174,"ext","codeunit",9027,"GetEssentialAttachPlanId",0],[181,"call","CreatePlan",3],[183,"ext","codeunit",9999,"SetUpgradeTag",1],[183,"ext","codeunit",9058,"GetEssentialAttachUpgradeTag",0]]},{"name":"AddMicrosoft365","line":187,"kind":"procedure","access":"local","params":0,"steps":[[197,"ext","codeunit",9999,"HasUpgradeTag",1],[197,"ext","codeunit",9058,"GetMicrosoft365UpgradeTag",0],[200,"ext","codeunit",9027,"GetMicrosoft365PlanId",0],[207,"call","CreatePlan",3],[209,"ext","codeunit",9999,"SetUpgradeTag",1],[209,"ext","codeunit",9058,"GetMicrosoft365UpgradeTag",0]]},{"name":"AddBCAdmin","line":213,"kind":"procedure","access":"local","params":0,"steps":[[223,"ext","codeunit",9999,"HasUpgradeTag",1],[223,"ext","codeunit",9058,"GetBCAdminUpgradeTag",0],[227,"ext","codeunit",9027,"GetBCAdminPlanId",0],[232,"call","CreatePlan",3],[235,"ext","codeunit",9027,"GetDelegatedBCAdminPlanId",0],[240,"call","CreatePlan",3],[242,"ext","codeunit",9999,"SetUpgradeTag",1],[242,"ext","codeunit",9058,"GetBCAdminUpgradeTag",0]]},{"name":"AddD365Admin","line":246,"kind":"procedure","access":"local","params":0,"steps":[[256,"ext","codeunit",9999,"HasUpgradeTag",1],[256,"ext","codeunit",9058,"GetMD365AdminUpgradeTag",0],[259,"ext","codeunit",9027,"GetD365AdminPlanId",0],[266,"call","CreatePlan",3],[268,"ext","codeunit",9999,"SetUpgradeTag",1],[268,"ext","codeunit",9058,"GetMD365AdminUpgradeTag",0]]},{"name":"AddDelegatedD365Admin","line":272,"kind":"procedure","access":"local","params":0,"steps":[[282,"ext","codeunit",9999,"HasUpgradeTag",1],[282,"ext","codeunit",9058,"GetDelegatedD365AdminUpgradeTag",0],[285,"ext","codeunit",9027,"GetD365AdminPartnerPlanId",0],[292,"call","CreatePlan",3],[294,"ext","codeunit",9999,"SetUpgradeTag",1],[294,"ext","codeunit",9058,"GetDelegatedD365AdminUpgradeTag",0]]},{"name":"AddDefaultPlanConfigurations","line":297,"kind":"procedure","access":"local","params":0,"steps":[[303,"ext","codeunit",9999,"HasUpgradeTag",1],[303,"ext","codeunit",9058,"GetPlanfigurationsUpgradeTag",0],[306,"ext","codeunit",9822,"CreateDefaultPlanConfigurations",0],[308,"ext","codeunit",9999,"SetUpgradeTag",1],[308,"ext","codeunit",9058,"GetPlanfigurationsUpgradeTag",0]]},{"name":"DeletePlan","line":312,"kind":"procedure","access":"local","params":1,"steps":[[317,"write",9004,"Delete"]]},{"name":"RenameOrCreatePlan","line":321,"kind":"procedure","access":"local","params":2,"steps":[[327,"write",9004,"Modify"],[329,"call","CreatePlan",3]]},{"name":"CreatePlan","line":333,"kind":"procedure","access":"local","params":3,"steps":[[340,"write",9004,"Insert",1]]}]}