Только через веб-сервисы.
X++:
function Retrieve(mEntity)
{
var sXml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
sXml += "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">";
sXml += "<soap:Body>";
sXml += "<entityName xmlns=\"http://schemas.microsoft.com/crm/2006/WebServices\">"+mEntity.get("Name")+"</entityName>";
sXml += "<id xmlns=\"http://schemas.microsoft.com/crm/2006/WebServices\">"+hParams.get("currentEntityId")+"</id>";
sXml += "<columnSet xmlns:q1=\"http://schemas.microsoft.com/crm/2006/Query\" xsi:type=\"q1:ColumnSet\" xmlns=\"http://schemas.microsoft.com/crm/2006/WebServices\">";
sXml += "<q1:Attributes>";
var fields = mEntity.get("Fields");
var fKeys = fields.keys();
for (var i=0; i<fKeys.length; i++)
{
if (fields.get(fKeys[i]).get("schema") != null)
sXml += "<q1:Attribute>" + fields.get(fKeys[i]).get("schema") + "</q1:Attribute>";
}
sXml += "</q1:Attributes>";
sXml += "</columnSet>";
sXml += "</soap:Body>";
sXml += "</soap:Envelope>";
var oXmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
oXmlHttp.Open("POST", "/MsCrmServices/2006/CrmService.asmx", false);
oXmlHttp.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2006/WebServices/Retrieve");
oXmlHttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
oXmlHttp.setRequestHeader("Content-Length", sXml.length);
oXmlHttp.send(sXml);
if(oXmlHttp.responseXML != null)
return oXmlHttp.responseXML.selectSingleNode("/soap:Envelope/soap:Body/RetrieveResult");
return null;
}
Это в качестве примера. mEntity - мой массив