Javascript odata查询在ie 7中不起作用

Javascript odata查询在ie 7中不起作用,javascript,json,internet-explorer-7,dynamics-crm-2011,compatibility,Javascript,Json,Internet Explorer 7,Dynamics Crm 2011,Compatibility,您好,我有一个odata查询,它在InternetExplorer8和更高版本中工作得非常好,但在InternetExplorer7中不工作。我希望在创建一个不同的查询方法之前,可以在某处插入某种兼容行 function setPriceListFromCurrency() { var pricelevel = Xrm.Page.getAttribute("pricelevelid"); var currencyid = Xrm.Page.getAttribute("transactioncu

您好,我有一个odata查询,它在InternetExplorer8和更高版本中工作得非常好,但在InternetExplorer7中不工作。我希望在创建一个不同的查询方法之前,可以在某处插入某种兼容行

function setPriceListFromCurrency() {

var pricelevel = Xrm.Page.getAttribute("pricelevelid");
var currencyid = Xrm.Page.getAttribute("transactioncurrencyid").getValue();
if (currencyid == null) return;
SDK.REST.retrieveMultipleRecords("PriceLevel","?$select=PriceLevelId,Name&$filter=TransactionCurrencyId/Id eq guid'"+currencyid[0].id.substr(1, 36)+"'&$top=1",

    function (results)
    {
        //Results handler

        var pricelevelrecord = results[0];
        if (pricelevelrecord != null)
        {
            pricelevel.setValue(
            [{
            id: pricelevelrecord.PriceLevelId,
            name: pricelevelrecord.Name,
            entityType: 'pricelevel'
            }]
            );
        }
        else
        {
            alert("No Pricelist records are available with this currency.");
            pricelevel.setValue(null);
        }
    },

    function (error)
    {
        //Error handler
        alert(error.message);
        pricelevel.setValue(null);
    },
    function ()
    {
       //Complete handler
    }
  );

}这个问题已经得到了回答!该问题是由SDK.REST和下面的注释引起的。Internet Explorer不支持版本8之前的JSON.parse。您可以使用jQuery.parseJSON来代替

这个问题已经得到了回答!该问题是由SDK.REST和下面的注释引起的。Internet Explorer不支持版本8之前的JSON.parse。您可以改用jQuery.parseJSON(正如我看到的,您已经将问题标记为jQuery)。分享|编辑编辑2013年4月19日0:17回答2012年7月11日21:26查曼德2251314