Salesforce Certified Development Lifecycle and Deployment Architect — Question 49

The opportunityService and opportunityServiceTest classes are in package A but are used only in package B. Both second-generation packages have the same namespace. Therefore, they should be moved to package B for better organization and control.

What should the architect recommend for this process?

Answer options

Correct answer: A

Explanation

The correct answer is A because moving the classes to package B and updating the code ensures that all references are correctly aligned with the new location, maintaining functionality. Options B and D unnecessarily complicate the process by introducing deprecation and renaming, which can lead to confusion and additional work. Option C suggests creating new package versions, which is not necessary for simply relocating classes within the same namespace.