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
- A. Use the Schema namespace.
- B. Use a static resource.
- C. Perform a callout to the Metadata API.
- D. Perform a SOQL Query.
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.