代码(在 JSON 下方)评估以下 JSON 数据并返回“未定义”,即使很明显 systemuserid 可用。提前感谢您的帮助。
{
"d" : {
"results": [
{
"__metadata": {
"uri": "http://dynamics/DynamicsCRM/xrmservices/2011/OrganizationData.svc/new_new_license_sys temuserSet(guid'561d5751-0496-e111-84f8-0050561a2a63')", "type": "Microsoft.Crm.Sdk.Data.Services.new_new_license_systemuser"
}, "new_new_license_systemuserId": "561d5751-0496-e111-84f8-0050561a2a63", "new_licenseid": "538e6567-8c95-e111-84f8-0050561a2a63", "systemuserid": "40dda08e-2ee5-e011-b843-0050561a2a63", "VersionNumber": null
}
]
}
}
$.ajax(
{ type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "json",
url: odataSelect,
beforeSend: function (XMLHttpRequest)
{ XMLHttpRequest.setRequestHeader("Accept", "application/json"); },
success: function (data, textStatus, XmlHttpRequest)
{
ProcessReturnedEntity(data.d);
},
error: function (XmlHttpRequest, textStatus, errorThrown)
{ alert('OData Select Failed: ' + odataSelect);
}
});
ProcessReturnedEntity = function(OneEntity)
{
var one = OneEntity;
var Userid = one.systemuserid;
alert(Userid);
}