hi frnds,
when i retrieve entity reference value from another entity i cant get the name and id of the field.. it retruns the object but if am doing object.id it saying undefined.my code is
populatewithconnectiondata = function (){
var odataSelect = "http://XXX:5555/XXX/xrmservices/2011/OrganizationData.svc/ConnectionSet?$select=Record2Id&$filter=Record2RoleId/Id
eq guid'F55E1379-FD99-E011-9939-000C2917832C' and Record1Id/Id eq guid'0D84F247-4686-E011-B58D-000C2917832C'"
$.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)
{
// Use this method for a selection that return single entity
RetrieveEntityData(data.d);
},
error: function (XmlHttpRequest, textStatus, errorThrown) { alert('OData Select Failed: ' + odataSelect); }
});
}
function RetrieveEntityData(ManyEntities){
for( i=0; i< ManyEntities.length; i++)
var oneEntity = ManyEntities[i];
var ConnectedContactId = oneEntity.Record2Id.Id;
alert(ConnectedContactId)/here saying undefined
}
}
pls give mea solution as soon as possible thanx in advance
Arun Kumar G