2

In order to get OptionSet information, we can issue a request:

// Create the request
RetrieveAttributeRequest attributeRequest = new RetrieveAttributeRequest
{
    EntityLogicalName = Contact.EntityLogicalName,
    LogicalName = "new_string",
    RetrieveAsIfPublished = false
};

// Execute the request
RetrieveAttributeResponse attributeResponse =
    (RetrieveAttributeResponse)_serviceProxy.Execute(attributeRequest);

Console.WriteLine("Retrieved the attribute {0}.",
    attributeResponse.AttributeMetadata.SchemaName);

Is there a way to do this using an Odata request in crm 2016?

Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062
  • Possible duplicate of [Retrieve all OptionSet values using OData in Dynamics CRM](https://stackoverflow.com/questions/39427389/retrieve-all-optionset-values-using-odata-in-dynamics-crm) – Arun Vinoth-Precog Tech - MVP Jun 20 '17 at 00:03

1 Answers1

2

Yes you can, Use the Web API with Dynamics 365 metadata.

I suggest you look at the OptionSetMetadata, found at [Organization URI]/api/data/v8.2/GlobalOptionSetDefinitions

James Wood
  • 17,286
  • 4
  • 46
  • 89