Retrieving CRM OptionSet field using Simple.odata.client library

463 Views Asked by At

Can anyone provide the way to use it with Simple.Odata.Client library. I am using it as follows i.e.

string url = "EntityDefinitions(LogicalName='contact')/Attributes(LogicalName='new_country')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata? $select=LogicalName&$expand=OptionSet($select=Options)";

var countrylist = await client .FindEntriesAsync(url);

Following error is coming up i.e. The context URL

'http://api/data/v8.2/$metadata#EntityDefinitions('contact')/Attributes/Microsoft.Dynamics.CRM.PicklistAttributeMetadata(LogicalName,OptionSet,GlobalOptionSet,OptionSet(Options))/$entity' is invalid.

0

There are 0 best solutions below