Set Yes or No Boolean OptionSet using Common Data Service (CDS)

1.4k Views Asked by At

I have tried searching for an answer but could't find it. I have an OptionSet field (x) in Dynamics on an Entity. Its OptionSetType is Boolean. FalseOption is No and TrueOption is Yes.

I am to set the value of above field using CDS. I am making Http calls to update the data. The rest of the fields are updating OK but only this one has no affect and is always false. I have tried giving values like "true", true, "Yes", yes, 1, "1" ... but not working.

Does anyone know how to set the yes or not optionset using CDS?

Thanks in advance

Additional info: Here is the data that I am sending to D365 via CDS:

{{ 
"createdon": "2020-01-14T00:00:00", 
"receiveddate": "2020-01-14T00:00:00", 
"grosssaleprice": 297495.0000, 
"discount": 10374.0000, 
"islocalboolean": true, 
"agreementnumber": "Aj55" 
}} 

If you know CDS, it just works via http requests. and takes the above payload. All other fields are set as expected but the islocalboolean is not.

0

There are 0 best solutions below