javascript – CRM 2011 JScript retrieveMultiple抛出错误的请求错误
作者:互联网
我正在尝试使用联系人表单上的oData检索多个记录,但它正在抛出错误请求错误.任何人都可以建议我为什么会这样.
提前致谢
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);
}
解决方法:
试试这个:
function myFunction
{
var contId = Xrm.Page.data.entity.getId();
retrieveMultiple("ConnectionSet", "ConnectionId,Record2Id", "Record2Id/Id eq guid'" + contId + "'", successCallbackConnections, errorCallbackConnections, true);
}
标签:javascript,dynamics-crm,dynamics-crm-2011,jscript 来源: https://codeday.me/bug/20190620/1245442.html