Microsoft Dynamics CRM - What is the OData url format to retrieve label of two option set attributes of an entity?

847 Views Asked by At

The following Odata url retrieves attributes of an entity.

http:// < host_name>/< org_name>/api/data/v8.1/EntityDefinitions(70816501-EDB9-4740-A16C-6A5EFBC05D84)/Attributes

The entity has few TwoOptionSet attributes. I want to retrieve the label for TrueOption and FalseOption. In the database, these values are stored in StringMapBase table.

How do I construct the OData query to retrieve these labels? Can you please guide me?

Thanks, Vanathi

1

There are 1 best solutions below

2
Henk van Boeijen On BEST ANSWER

OData cannot be used to retrieve metadata. You need to use a SOAP request instead. However, when you are on Dynamics CRM 2016 you can use the Web API since it supports metadata queries.

For Dynamics 365/CRM 2016 you can find detailed information on getting attribute metadata using the Web API here.