CRM 2011 FetchXML返回无效的XML

时间:2015-08-05 10:58:42

标签: dynamics-crm-2011 fetchxml

我正在尝试检索帐户,但fetchXML返回的是无效的XML:

    function SelectLoadOutTransactionCurrency(id)
{
debugger;
var _oService = new FetchUtil(_sOrgName, _sServerUrl);
var sFetch = "<fetch mapping='logical'>" +
"<entity name='salesorder'>"+
"<attribute name='transactioncurrencyid' />" +
"<filter type='and'>" +
"<condition attribute = 'salesorderid' operator='eq' value='" + id + "'/>" +
"</filter>" +
"</entity>" +
"</fetch>";

var fetchResult =_oService.Fetch(sFetch, null);
return fetchResult.results[0].attributes["transactioncurrencyid"].guid;
}
 function GetSuppliers(){  
debugger;
_oService = new FetchUtil(_sOrgName, _sServerUrl);
var sFetch = "<fetch version='1.0' output-format='xml-platform'    mapping='logical' distinct='false'>" +
 "<entity name='account'>" +
 "<attribute name='name' />" +
 "<attribute name='accountid' />" +
 "<order attribute='name' descending='false'/>" +
 "<filter type='and'>" +
 "<condition attribute='new_accounttype' operator='eq' value='100000001'/>" +
 "</filter>" +
 "</entity>" +
 "</fetch>";        
 var fetchResult =_oService.Fetch(sFetch, null);
 return fetchResult;
 }
    function addOption(selectbox, text, value) {
        var optn = document.createElement("OPTION");
        optn.text = text;
        optn.value = value;
        selectbox.options.add(optn);
    }

name属性的字符无效(&#39;)..是否有办法逃避此字符或是否有更新汇总?

0 个答案:

没有答案