PL-400 · Question #210
You plan to populate records in a Common Data Service entity containing an option set field. The source system has the label for the option set but not the corresponding integer value. You are using a
The correct answer is A. Use Web API and use a PicklistAttibuteMetadata request.. Because the programming language is not .NET, the Organization Service SDK - which is a .NET assembly - is not available. Options B and D are therefore eliminated. The Dataverse/CDS Web API is HTTP-based and language-agnostic, accessible from any platform. To retrieve the integer
Question
Options
- AUse Web API and use a PicklistAttibuteMetadata request.
- BUse the Organization service and execute a RetrieveOptionSetRequest request.
- CUse Web API and use an InsertOptionValue action.
- DUse the Organization service and execute a RetrieveAttributeRequest request.
How the community answered
(34 responses)- A79% (27)
- B3% (1)
- C9% (3)
- D9% (3)
Explanation
Because the programming language is not .NET, the Organization Service SDK - which is a .NET assembly - is not available. Options B and D are therefore eliminated. The Dataverse/CDS Web API is HTTP-based and language-agnostic, accessible from any platform. To retrieve the integer value for a specific option set label, you use the Web API to query PicklistAttributeMetadata (A), which returns the full metadata for the attribute including the Options collection that maps each integer value to its display label. Option C (InsertOptionValue) is an action that adds a new value to an option set - it does not retrieve existing values.
Community Discussion
No community discussion yet for this question.