Monday, 1 August 2011

Error - sp.scriptutility is null or not an object using Ecmascript\Javascript client Object model – SharePoint 2010


TIP  - If you get sp.scriptutility is null or not an object when you use Ecmascript\Javascript client Object model in SharePoint 2010 try using

<script type=”text/ecmascript”>

ExecuteOrDelayUntilScriptLoaded(yourFunction, “sp.js”);

</script> 

for writting your ecmascript client objetc model code.

Ads by Google

2 comments:

  1. When you use your own master page, must sure you have all of the neccessary .js files registered

    ReplyDelete
  2. I found that removing the script type="text/javascript" src="/_layouts/SP.js" from the javascript when running in a SharePoint Content Editor Web Part stopped this error. I suspect that the SP.js may have been loaded incorrectly but have been working on a locked down machine with IE7 so the dev toolbar is not as useful for debugging this as newer IEs.

    ReplyDelete