Salesforce Certified Platform Developer II — Question 109

What is the optimal technique a developer should use to programmatically retrieve Global Picklist options in a Test Method?

Answer options

Correct answer: A

Explanation

The optimal technique is to use the Schema namespace, which allows developers to access metadata, including Global Picklist options, efficiently within a Test Method. The other options, such as using a static resource or performing a callout to the Metadata API, are not suitable for this purpose, and a SOQL Query cannot retrieve picklist options directly.