SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am building a SPA using SP 2010 as my back end but with custom HTML/CSS/JS deployed to a subfolder of _Layouts. I get everything I need from ListData.svc with the exception of the current logged on user which I would like to just get using CSOM. Is there a list of the required JS files that I must load to get access to the CSOM? Currently I am experiencing:

Uncaught ReferenceError: FV4UI is not defined -- ( CORE.js: 2 )

The reason why I have chosen to go this route is that a frequent complaint from my users is that "SharePoint is slow". I want to have the most complete control over my HTML and the presentation of the data as well as use the advanced features of HTML5 that seem to cause the standard SharePoint 2010 UI a lot of grief.

I am loading the folloowing JS files and of course I only want to load the files that are required:

<script type="text/javascript" src="../MicrosoftAjax.js"></script>
<script type="text/javascript" src="../1033/CORE.js"></script>
<script type="text/javascript" src="../1033/INIT.js"></script>
<script type="text/javascript" src="../SP.Core.js"></script>
<script type="text/javascript" src="../sp.js"></script>
share|improve this question
up vote 6 down vote accepted

The error may be throws because core.js loaded before init.js (because FV4UI function is part of init.js file).

Also, check this post.

<!-- the following 5 js files are required to use CSOM -->
<script src="/_layouts/1033/init.js"></script>
<script src="/_layouts/MicrosoftAjax.js"></script>
<script src="/_layouts/sp.core.js"></script>
<script src="/_layouts/sp.runtime.js"></script>
<script src="/_layouts/sp.js"></script>
share|improve this answer
Interesting blog! – Christophe May 20 '13 at 18:04
While helpful, that still isn't enough. I'm now getting Cannot read property 'webServerRelativeUrl' of undefined. I'll try and add additional details. – Robert Kaucher May 20 '13 at 19:46
When ever I tried to execute my code in a Revealing Module function I got error after error. Once I took the code out of the RMP function, everything worked with the answer above. – Robert Kaucher May 20 '13 at 21:17
I forgot my manners. Thanks, Andrew! – Robert Kaucher May 21 '13 at 13:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.