1

안녕하세요, Internet Explorer 8 이상에서는 제대로 작동하는 odata 쿼리가 있지만 인터넷 익스플로러 7에서는 사용할 수 없습니다. 호환성이있는 라인이 필요합니다. 다른 쿼리 방법을 만들 수 있습니다.odata 쿼리가 작동하지 않습니다. 7

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 
    } 
); 

은}

+1

이 질문에 대한 답변이 제공되었습니다. 문제는 아래 주석과 함께 SDK.REST 때문입니다. Internet Explorer는 버전 8 이전의 JSON.parse를 지원하지 않습니다. 대신 jQuery.parseJSON을 사용할 수 있습니다 (jquery 질문 태그가 붙어 있음). 공유 | 편집 21시 26분 에서 0시 17분 7월 11일 '12 대답 \t 에서 4월 19일 '13 편집 \t 파이리 2,251314 – Jason

답변

0

은이 질문에 답을하고있다! 문제는 아래 주석과 함께 SDK.REST 때문입니다. Internet Explorer는 버전 8 이전의 JSON.parse를 지원하지 않습니다. 대신 jQuery.parseJSON을 사용할 수 있습니다