charaf_ed | 2019-05-10 07:25:55 UTC | #1
Hello,
I can't get the information set in Dynamics when it comes to a set option type field. I added a custom field in Dynamics called Civility which is an Option set containing different options : Mr, Mrs, Doctor .... I can only retrieve the integer value but not the label.
In the request in JSON, I'm limited to the primitive types : string, integer, null, boolean.
any ideas to how to get the string value Mr, Mrs.. ?
Yours
Jason_Mathison | 2019-05-10 13:34:41 UTC | #2
Hi charaf_ed,
You can get the meaning of the integer by using the RetrieveOptionSet or RetrieveAllOptionSets APIs:
https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/create-update-optionsets
If you expect the list of values to be stable you could look up the mappings for that option set and then create a switch action in architect to do the conversions like 4 -> "Doctor".
I have never used this Dynamics API, so I am not sure how difficult it would be to retrieve the option set and find the right value on the fly.
--Jason
system | 2019-06-10 13:34:43 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 5125