The JavaScript Object Model (JSOM) is a SharePoint Client Object Model that enables you to work with objects on the client side without having to deploy code on the server.
Questions tagged [sharepoint-jsom]
135 questions
3
votes
1 answer
Converting AngularJS deffered promise to AngularX observable for JSOM
I am converting an AngularJS application to Angular 4 which gets some data from SharePoint. It is using the JSOM and for that the executeQueryAsync() method.
I would like to get the data with executeQueryAsync() from the server and store it in an…

Florian Leitgeb
- 15,657
- 6
- 31
- 40
3
votes
1 answer
SharePoint JSOM KeywordQuery changing ContentType that it's searching for
I'm currently using AngularJS with the SharePoint JSOM to execute some Keyword Queries against a Result Source.
I've got an angular factory that accepts a ResultSourceName and ResultSourceLevel…

Ben Black
- 3,751
- 2
- 25
- 43
3
votes
2 answers
SharePoint JavaScript API for Workflow throws an error
I am trying to access information about running workflows in a SharePoint list but I am running into problems with the workflow services JSOM library. I am using the workflow services just like every example I can find, see code below:
var context =…

Travis L
- 43
- 5
2
votes
0 answers
apply filter to SharePoint social rest api
I am using the following rest api query to get the followed documents of a user in a SharePoint tenant as thus
var followedContentQuery= _spPageContextInfo.webAbsoluteUrl + "/_api/social.following/my/followed(types=2)";
I need to trim the…

user989865
- 627
- 3
- 9
- 25
2
votes
0 answers
Getting User Level Permissions on List in sharepoint online using Javascript and Rest API
I have implemented sharepoint hosted app for getting user level permissions on a list using javascript and rest api.
Here is my code,
'use strict';
var hostweburl;
var appweburl;
var context = SP.ClientContext.get_current();
var user =…

GOPAL YADAV
- 1,181
- 2
- 9
- 18
2
votes
1 answer
Retrieve events number from SharePoint calendar using JS
I have a SharePoint calendar list, and I'm looking for a script to retrieve the number of events on a day. For example, for today, 10 August, I want to just retrieve the number of events stored in my calendar.
Any suggestion will be very helpful.

ysfibm
- 436
- 2
- 14
- 30
2
votes
3 answers
how to get website link using javascript
I am trying to get the website link, and put it in an image source adding image path,
Example:
suppose that I'm inside a website, I want to get the link of it and add my image path to it and inject it in source image in the source code of the same…

ysfibm
- 436
- 2
- 14
- 30
2
votes
1 answer
How to get current user details #JSOM, #O365, #jQuery, #Nintex forms
I have used following code on Nintex forms on SharePoint 2013 to get current user details,
var userid = _spPageContextInfo.userId;
var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/getuserbyid(" + userid + ");
but it does not work on…

Prasad De Silva
- 836
- 1
- 12
- 22
1
vote
1 answer
How to check if a Rating is enabled for a sharepoint online list using JavaScript?
I am writing a JavaScript code where I want to allow user to provide star ratings to a particular article.
This code will be in the form of widget. SO I want to first check if the Rating is enabled for a given sharepoint list. So, if the Rating is…

Jaykumar Patil
- 359
- 4
- 13
1
vote
2 answers
SharePoint list CSR default rendering fallback
I was searching on the internet found a couple of good examples but mostly related to rendering the default render method for forms.
My case is that I have a page with the same list in two webparts with different views, for one I want to apply the…

Ricardo Silva
- 1,221
- 9
- 19
1
vote
1 answer
Unknown Errors with JSOM API - Sharepoint 2013 (Adding multiple, unique site columns to multiple, unique content types)
I've been through a couple iterations on how to do this, and I'm not sure exactly what is going on. I'm currently working on an administration tool that will allow easy duplication of our SharePoint sites. I've been faced with the task of adding…

Michael Melton
- 11
- 1
- 3
1
vote
1 answer
SPField.FieldRenderingControl equivalent to CSOM or JSOM
Using the Microsoft.SharePoint dll, I can render SP Fields in custom application page using the below server side code.
BaseFieldControl editControl = field.FieldRenderingControl;
editControl.ID = field.Id.ToString() …

JC Sent
- 11
- 2
1
vote
0 answers
Metadata changes after moving a file with "moveTo"
I tried different ways to move a file from one library to another library on the same site (SharePoint Online). The file is moved but the modified date and modified user are overwritten.
Worse the modified user is changed for all history versions…

Gremik
- 11
- 3
1
vote
2 answers
Is there any way to verify whether given URL is a valid SharePoint List / Library Url?
I have a requirement to ask user to type in the URL of the SharePoint List or library and do validation whether that is a valid list or not. The URL could be of other site collection / subsite too. What is the best way to check if its a valid list…

Nitin Khubani
- 354
- 1
- 4
- 18
1
vote
1 answer
Set SharePoint Search Query Result Source in JSOM
I am setting the result source level to 'SPSite' as I want to use the result source defined at site collection level. But it does not work. Is 'SPSite' a valid argument in JSOM?
let query = new Search.KeywordQuery(ctx);
// set Source…

Damitha
- 391
- 3
- 16