Question 1 of 5
Advanced Developer FundamentalsA maximum discount percentage needs an org-wide default, a different value for everyone on the Sales Manager profile, and overrides for a few named users. Apex code must get the value that applies to the user who runs it, and a cleanup class must delete a user's override in Apex when that user changes teams. Which configuration store should the developer use?
Show the answer and explanation
Correct answer: B. A hierarchy custom setting with a default value plus values for the profile and each named user
Custom settings can be configured as a hierarchy where values are made available to specific users, profiles, or org levels, and custom settings support full CRUD operations in Apex, so the cleanup class can delete an override. Custom metadata types handle list data and don't support hierarchy type data based on user, profile, or org level, and Apex can create, read, and update their records but not delete them. The list custom setting is the tempting choice because Apex can delete its records, but it's the hierarchy configuration that makes custom settings values available to specific users, profiles, or org levels.
Read from the source: Trailhead : Get Started with Custom Metadata Types


