Question 1
Choose 1
Universal Containers (UC) uses a managed package to install an internal Sales app in five orgs. Within each
org there are integrations and local processes with the objects of the managed package. UC wants to use
unlocked packages for better integration with CI/CD processes.
What would the Salesforce architect recommend for this migration
Correct answer:
D. Migrate all classes, Visualforce, and components from the managed package to the unlocked package.
Install the new version of the managed package (objects/fields only) and the unlocked package with the
other components.
Explanation
UC wants to move to unlocked packages for better CI/CD integration, but the managed package contains objects and fields — and this is the critical constraint. Data lives in the objects/fields. If you uninstall the managed package, all data in its objects is deleted, which is catastrophic for a live org with integrations and local processes.
The correct migration strategy is a hybrid/separation approach:
1. Keep the managed package installed for its objects and fields — install a new version of the managed package that contains only the objects/fields (the data model). This preserves all existing data and relationships.
2. Migrate the code components — Apex classes, Visualforce pages, Lightning components — out of the managed package into unlocked packages. These components don't hold data, so moving them is safe.
3. Adopt unlocked packages for the code so UC gains the CI/CD benefits it wants (source-driven, version-controlled, pipeline-friendly) — while the data model remains protected inside the managed package.
This avoids data loss while achieving the CI/CD goal.
Why Other Options Are Incorrect
A. Export data, uninstall managed package, install unlocked package with the same namespace, restore data
— Uninstalling the managed package deletes the data, and you cannot reuse a managed package's namespace for an unlocked package (namespaces are tied to the package type/publisher). Even with export/restore, this is risky, complex, and may not fully restore relationships or references. It also breaks integrations during the migration window.
B. Export data, uninstall, install unlocked package without namespace, restore data
— Same core problem: uninstalling deletes the data, and dropping the namespace breaks all references from integrations, local processes, and code that expect the namespace. This is highly disruptive and error-prone.
C. Do not change to unlocked package; all CI/CD can be done with the managed package
— This ignores UC's explicit requirement to use unlocked packages for better CI/CD integration. While managed packages can participate in CI/CD to a degree, they are less flexible for source-driven pipelines. This option doesn't meet the business goal.
References
Salesforce Developer Docs – Unlocked Packages vs. Managed Packages: Differences in CI/CD support, namespaces, and data behavior.
Salesforce Developer Docs – Uninstalling a Package: Uninstalling deletes the package's data and components.
UC wants to move to unlocked packages for better CI/CD integration, but the managed package contains objects and fields — and this is the critical constraint. Data lives in the objects/fields. If you uninstall the managed package, all data in its objects is deleted, which is catastrophic for a live org with integrations and local processes.
The correct migration strategy is a hybrid/separation approach:
1. Keep the managed package installed for its objects and fields — install a new version of the managed package that contains only the objects/fields (the data model). This preserves all existing data and relationships.
2. Migrate the code components — Apex classes, Visualforce pages, Lightning components — out of the managed package into unlocked packages. These components don't hold data, so moving them is safe.
3. Adopt unlocked packages for the code so UC gains the CI/CD benefits it wants (source-driven, version-controlled, pipeline-friendly) — while the data model remains protected inside the managed package.
This avoids data loss while achieving the CI/CD goal.
Why Other Options Are Incorrect
A. Export data, uninstall managed package, install unlocked package with the same namespace, restore data
— Uninstalling the managed package deletes the data, and you cannot reuse a managed package's namespace for an unlocked package (namespaces are tied to the package type/publisher). Even with export/restore, this is risky, complex, and may not fully restore relationships or references. It also breaks integrations during the migration window.
B. Export data, uninstall, install unlocked package without namespace, restore data
— Same core problem: uninstalling deletes the data, and dropping the namespace breaks all references from integrations, local processes, and code that expect the namespace. This is highly disruptive and error-prone.
C. Do not change to unlocked package; all CI/CD can be done with the managed package
— This ignores UC's explicit requirement to use unlocked packages for better CI/CD integration. While managed packages can participate in CI/CD to a degree, they are less flexible for source-driven pipelines. This option doesn't meet the business goal.
References
Salesforce Developer Docs – Unlocked Packages vs. Managed Packages: Differences in CI/CD support, namespaces, and data behavior.
Salesforce Developer Docs – Uninstalling a Package: Uninstalling deletes the package's data and components.
