CRM 2011 JScript retrieveMultiple throwing Failed request error
I am trying to fetch multiple records using oData
a contact form, but it is throwing an error Bad Request
. Can someone suggest me why this is happening.
Thank you in advance
JScript
// Retrieving multiple connections with accound ID as Record2Id.
function myFunction
{
var contId = Xrm.Page.data.entity.getId();
retrieveMultiple("ConnectionSet", "ConnectionId", "Record2Id eq '" + contId + "'", successCallbackConnections, errorCallbackConnections, true);
}
function successCallbackConnections(data, textStatus, XmlHttpRequest)
{
for(i=0; i < data.length; i++)
{
alert(data[i].RoleName);
}
}
function errorCallbackConnections(XmlHttpRequest, textStatus, errorThrown) {
alert(errorThrown);
}
+3
source to share