0

I am working on some functionality and I want to get value of some fields whose type like OptionSet, Status, State etc. When I am trying to get value of it, I am getting value in numbers like 0 and 1.

i.e. https://xxxxxx.crm.dynamics.com/xrmservices/2011/OrganizationData.svc/InvoiceSet

When I fire above query and get data, data of OptionSet types is in numbers where actual data is different. Same way when I try to get Status Code whose type is Status, it returns value like 0 and 1. The actual value is "Active".

Can anybody suggest me how to get value of this such fields?

Nanji Mange
  • 2,155
  • 4
  • 29
  • 63

1 Answers1

0

Just FYI. 0, 1 and other integers are real values. Active, Inactive and other - are labels. If you want to get labels along with int values you will have to switch to SOAP and use FormattedValues collection that will contain label of correspond field or to WebApi - http://himbap.com/blog/?p=2077

Andrew Butenko
  • 5,048
  • 1
  • 14
  • 13
  • Well, thank you for informing else I would just go for research again and again. I have managed by cache the options while getting entity fields and used it. – Nanji Mange Oct 19 '16 at 07:35