Questions tagged [sp.js]

SP.js is The SharePoint 2013 Client Object Model library and allows using some SharePoint's powerful features from a client Web Part.

It is mostly used in correlation with .Net applications. Good tutorial here to proceed.

There now exists a specific SharePoint StackExchange site.

7 questions
1
vote
1 answer

How to fix: Save filtered lookup by current user and status in sharepoint online

I filtered a lookup field by current user id and status using "SP.js CSOM SP.ClientContext" and it was successful in filtering the lookup. But trying to save gave an error "Sorry, Something went wrong", with a correlation ID…
amaugo somto
  • 382
  • 1
  • 2
  • 10
1
vote
1 answer

SharePoint React pnpjs

I am working on a react project for SharePoint framework. My question is a more or less general question. I came across a certain problem which I don't understand: I tried to use sp.search with an object matching the SearchQuery interface, but did…
1
vote
1 answer

Get attachement binary of SP.File object using JavaScript

I'm facing with a problem in retrieving binary of attachement list item. I use this code to get the value: var appweburl = window.location.protocol + "//" + window.location.host + _spPageContextInfo.webServerRelativeUrl; var hostweburl =…
FerdiC
  • 11
  • 1
1
vote
0 answers

Unable to load SP.js in content editor web part Sharepoint 2013

My environement is SP2013 I am unable to run below code under Content Editor WebPart loaded below EditForm.aspx page for one of my test list. Please assist the spot of my error. Yes, both of my js files are in Style Library of my site. I am not…
Chintan.Desai
  • 31
  • 1
  • 2
  • 8
1
vote
4 answers

Why is SP.js not loading?

I have researched this pretty thoroughly and everyone says that the code I have below should load SP.js, but I cannot get it to load. Debugging I get: NewForm.aspx, line 1667 character 5 SCRIPT5009: 'PeoplePicker' is undefined and do not see…
user2366475
  • 31
  • 1
  • 1
  • 3
0
votes
3 answers

using SP.js in Office 365 SharePoint Addin

I have used the "sp.js" to access the sharepoint ClientContext in SharePoint 2010 and 2013 webparts. I want to use the SP ClientContext in my office 365 add-in. The code i have used, ExecuteOrDelayUntilScriptLoaded(function () { var context =…
Rajagopal 웃
  • 8,061
  • 7
  • 31
  • 43
0
votes
1 answer

SP.js "Uncaught TypeError: Object [object Object] has no method 'get_staticObjects'"

I am trying to write a small SPA that acts as a UI layer for a SharePoint list. I have successfully done so with a regular AJAX call, but, due to the limitations of that method, I now want to do so with the JavaScript Object Model. The problem I am…
Joshua
  • 2,352
  • 2
  • 19
  • 23