Hi,
I am using a odata query that returns results in a JSON object. However, if there is no data returned from the data for particular record, the object is empty/undefined/null. I am not sure how to deal with this exception in my javascript code, or what to detect to filter out the result. Here is a sample of the two objects:
Works with: saqqarra.nu.local/.../IncidentSet$select=new_MonthofQuestionairre,new_Year&$filter=CustomerId/Id eq guid'58197E57-B385-E211-A045-DEB192987AAA' and new_Year eq 2013 and new_MonthofQuestionairre/Value eq 1 and StateCode/Value eq 1
{
"d" : {
"results": [
{
"__metadata": {
"uri": "saqqarra.nu.local/.../IncidentSet(guid&, "type": "Microsoft.Crm.Sdk.Data.Services.Incident"
}, "new_MonthofQuestionairre": {
"__metadata": {
"type": "Microsoft.Crm.Sdk.Data.Services.OptionSetValue"
}, "Value": 1
}, "new_Year": 2013
}
]
}
}
Does not work with: saqqarra.nu.local/.../IncidentSet$select=new_MonthofQuestionairre,new_Year&$filter=CustomerId/Id eq guid'58197E57-B385-E211-A045-DEB192987AAA' and new_Year eq 2013 and new_MonthofQuestionairre/Value eq 2 and StateCode/Value eq 1
{
"d" : {
"results": [
]
}
}