Dismiss Notice

Register now to be one of the first members of this SharePoint Community! Click here it just takes seconds!

Dismiss Notice
Welcome Guest from Country Flag

Object Doesn't support property or method '$1X'

Discussion in 'Official Microsoft News' started by Microsoft SharePoint, Dec 9, 2015.

Thread Status:
Not open for further replies.
  1. Microsoft SharePoint

    Microsoft SharePoint Guest

    Blog Posts:
    0
    I am using JSOM in Nintex Forms 2013. My script includes are

    /_layouts/15/sp.runtime.debug.js /_layouts/15/sp.debug.js /_layouts/1033/init.js /_layouts/MicrosoftAjax.js /_layouts/sp.core.js /_layouts/sp.runtime.js /SiteAssets/jquery.SPServices-2014.01.min.js

    As you can see I am trying to be very sure that I am loading all the js files for JSOM. I have successfully gotten to the end of my code while Previewing the form. However, in practice using the Display/Edit/New Form have the exact same Error as the title.

    NWF$(document).ready(function(){ NWF.FormFiller.Events.RegisterAfterReady(function (){ setTimeout(onSPLoad, 3000); /// Despite using all load script methods this was still necessary }); }); function onQuerySucceeded(sender, args) { /// all variables except for collListItem given very unique names to /// prevent script clashing var oolistItemInfo = ''; var oolistItemEnumerator = collListItem.getEnumerator(); while (oolistItemEnumerator.moveNext()) { var oooListItem = oolistItemEnumerator.get_current(); oolistItemInfo += '\nID: ' + oooListItem.get_id() + '\nDisplay name: ' + oooListItem.get_displayName(); } alert(oolistItemInfo.toString()); } function onQueryFailed(sender, args) { alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace()); } function onSPLoad(){ SP.SOD.executeFunc('sp.js', 'SP.ClientContext', beginJSOM); } function beginJSOM() { var ooclientContext = new SP.ClientContext.get_current(); alert(ooclientContext.get_url()); console.log(ooclientContext.get_web()); var ooweb = ooclientContext.get_web(); alert("web"); var oolistcoll = ooweb.get_lists(); alert("listcoll"); var ooList = oolistcoll.getByTitle('LegacyPolicies'); alert('LegacyPolicies loaded'); var oocamlQuery = new SP.CamlQuery(); oocamlQuery.set_viewXml('<View><Query><Where><Leq>' + '<FieldRef Name=\'ID\'/><Value Type=\'Number\'>5</Value>' + '</Leq></Where></Query><RowLimit>50</RowLimit></View>'); alert("QueryReady"); this.collListItem = ooList.getItems(oocamlQuery); alert("collListItem"); ooclientContext.load(collListItem, 'Include(Id, DisplayName)'); ooclientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed)); }

    This code errors after alert(ooclientContext.get_url); Running get_web(); will cause the crash, it happens anywhere between clientContext.get_current() and get_web(). The exact line in sp.runtime.js that has the issue is this.$1_0=SP.ClientRequest.get_nextSequenceId();if(d){a.$1X(this); it appears to loop a few times through this, and then throws the error. Sorry I am not an expert at debugging.

    If you know the answer, or have any hints that lead to an answer, I will literally love you.

    submitted by ChronoChris
    [link]
     
Thread Status:
Not open for further replies.

Share This Page

LiveZilla Live Chat Software