QuestionQ56

VerifiedUnderstanding Packages

Sales and Service products will be developed by two teams using second-generation managed package(s). The Sales team will use a particular function of the Service product, but the architect wants to ensure that the team can use only the functions exposed by the Service team. No other team will use these same functions.

What should an architect recommend?

Explanation

The @NamespaceAccessible annotation makes public Apex in a second-generation managed package available to other 2GP managed packages that share its namespace. Keeping the Sales and Service products as separate packages with the same namespace permits access only to the deliberately exposed Service methods; packages outside that namespace cannot use them.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!