SCRIPT5007:无法在XrmServiceToolkit.js中获取未定义或空引用的属性“indexOf”

时间:2014-04-15 07:41:39

标签: javascript xrm

大家好我在XrmServiceToolkit.js中收到以下行的错误:

 var fetch = function (fetchCore, fetchAll, callback) {
    ///<summary>
    /// Sends synchronous/asynchronous request to do a fetch request.
    ///</summary>
    ///<param name="fetchCore" type="String">
    /// A JavaScript String containing serialized XML using the FetchXML schema.
    /// For efficiency, start with the "entity" node.
    /// </param>
    ///<param name="callback" type="Function">
    /// A Function used for asynchronous request. If not defined, it sends a synchronous request.
    /// </param>

    **var isAggregate = (fetchCore.indexOf("aggregate") !== -1);**
    if (fetchCore.slice(0, 6) === "<fetch")
    {
        var fetchEntity = jQuery(xmlParser(fetchCore)).find("entity");

        if (fetchEntity.length < 1)
        {
            throw new Error("XrmServiceToolkit.Fetch: No 'entity' node in the provided FetchXML.");
        }

var isAggregate =(fetchCore.indexOf(“aggregate”)!== -1);

这里我得到错误,这个错误在xrmservicetoolkit.js中,如何解决这个请帮忙

0 个答案:

没有答案