Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [jsom]

Use the JSOM to retrieve, update, and manage data in SharePoint.

8
votes
0answers
3k views

How to stop a SharePoint workflow using JSOM

Let me preface by saying that I'm a relative newbie to this SharePoint stuff and am still fumbling my way around a bit learning from code examples where necessary. That being said, I have no issue ...
5
votes
0answers
868 views

Unable to update taxonomy field value using REST API or JSOM

I'm not able to modify taxonomy field values with REST API or JSOM for a specific library. My code works on other lists, but not on this particular library, what can the problem be? The library has > ...
4
votes
0answers
294 views

Using JSOM calls with Angular 4

I have to port an AngularJS app to Angular4 which now uses promises and have no clue how I can use this with the executeQueryAsync() method from JSOM. I have also not found any documentation to this ...
4
votes
0answers
107 views

SharePoint Online JSOM Problems adding new item with Managed Metadata field

Hoping someone might be able to shed some light on a problem I'm having adding new items to a SharePoint Online list, using JSOM? I have modified some code I found here on stack exchange, the code ...
4
votes
0answers
226 views

What are _spPageContextInfo.fid and _spPageContextInfo.nid in SharePoint 365?

I am getting values as shown below while executing _spPageContextInfo.fid and _spPageContextInfo.nid in the console in my SharePont 365 site but am not getting for what these values are used here. ...
3
votes
0answers
83 views

Cancel a paused workflow with javascript on edit form

I have a SP2013 list item running a SP2010 Platform Workflow. The workflow will pause until a specified date then perform some actions. This workflow should be started when an item is created and ...
3
votes
0answers
55 views

How to work with JSOM typed-objects

This is a stumbling block that I keep hitting over and over again. Any advice or tips would be very helpful. I prefer to use the SP REST api to accomplish all kinds of things on our site, but for ...
3
votes
0answers
34 views

how to change the Connected SharePoint site Settings Programmatically?

I want to retrieve the "Connected SharePoint Site" Settings programmatically and also change the settings if they are different from my required criteria.
3
votes
0answers
96 views

Add columns in SharePoint list error with special characters

It throws error when I try to create and add column in list which contains special characters such as '&'. I tried following: DisplayName="a&b" Name="a&b" -------- throws ...
3
votes
0answers
140 views

Get the finished project using JavaScript in Project Server

In Project Server, I have a project information like project name , start date, end date. I would like to get the finished projects list using JavaScript. Anyone can point me out to the right ...
3
votes
0answers
121 views

Undefined error querying a sharepoint list

I have two lists CharitySlots and CharityBooking.CharityBooking has a lookup field into CharitySlots. CharitySlots has a Lookup (calculated field) to count the number of slots taken. I run an event ...
3
votes
0answers
427 views

Test if user has access to a web

We are trying to create a function to see if the logged in user has access to a web (subsite), and have come up with the following code; CheckPermissionOnWeb(); function CheckPermissionOnWeb() { ...
3
votes
0answers
271 views

SP.ClientContext.Load suddenly throwing uncaught TypeError?

I am trying to start a workflow from JSOM. I just had it working fine, and then I had to change some of the other code in the JavaScript file that is unrelated to the client context or executing ...
3
votes
0answers
477 views

SharePoint 2013 - Add-in - JSOM - Create SharePoint Group

I am trying to create a SharePoint Group in a SharePoint Add-in, which has Full Control over the site collection, using JSOM. Here is my code: function createGroup(groupName) { var ...
3
votes
0answers
246 views

Update profile properties jsom

I can update my own profile properties but i cant update other users profile properties. When i do i'll get an "you are not authorized.." error. I have administration rights. Here is my function to ...
3
votes
0answers
250 views

How do I restore specific list item version using JavaScript?

How do I restore specific list item version using JavaScript? Is there any way to restore specific version of list item using JSOM or REST API in Share Point?
3
votes
0answers
367 views

How do I get a list of followers for a content?

I need to know who is following a site a document or a tag. found how to get followers for the current user but not for a content.
2
votes
0answers
387 views

Multiline Enhanced Rich Text Field in Document Library

Trying to add Multiline Enhanced Rich Text field to a SharePointOnline Document Library using JSOM. The field appears properly in classic mode but gives 404 NOT FOUND error when clicking on the Pen (...
2
votes
0answers
479 views

Get workflow instance with certain status javascript

I continue to work on trying to get the internal status of all workflows on my site to find any that have been suspended. The internal suspended status does not change the status column, so I can't ...
2
votes
0answers
312 views

HOW to set permission on multiple folders

I got a client that has a really dense folder structure and they want to apply permission to the different folders. I wanted to know if there a way to apply permission to multiple folders at a time ...
2
votes
0answers
74 views

Custom Form Rendering RegisterTemplateOverrides in a promise issue

Using custom form rendering with JSLink, I fetch some data in promises before I attempt to do: SPClientTemplates.TemplateManager.RegisterTemplateOverrides(context); However because some of the ...
2
votes
0answers
52 views

Attach document to SharePoint 2010 List item with JSOM & WCF Service

I've to attach the document to list item with JSOM & WCF Service. Please check the below code function createListItem(webUrl, listName, itemProperties, success, failure) { $.ajax({ ...
2
votes
0answers
289 views

sharepoint online authentication using javascript object model

I have a local html page which contains javascript code that uses client context. I can run the code in sharepoint environment but i want to run it in my local html page, which is restricted due to ...
2
votes
0answers
100 views

Javascript API to generate calendar events

When a user clicked on "Save" button in the New form of calendar list, I want to save the dates that the user scheduled the event in another list. Based on the inputs provided in the form, I am ...
2
votes
0answers
34 views

WorkflowSubscriptionCollection always returning empty

I am trying get all workflow subscriptions on list using JSOM, But collection is always returning empty. I have associated reusable workflow on content type within list. Below is my code: ...
2
votes
0answers
49 views

Get Days from a Calendar using JSOM

I'm developing a form to add weekly timesheets for employees. I need to get days from a calendar using JSOM to display on the form on the form load. I need to display the current week on the form by ...
2
votes
0answers
35 views

Provision a sharepoint hosted workflow to the host web via JSOM?

I know it's possible to create lists and groups in the host web. What I'd like to accomplish is to create a list on the host web and then be able to add a workflow to that list. Is this possible with ...
2
votes
0answers
197 views

How to get metadata term by tag when creating this document set

i got this code, what this does, is that it takes a .csv file, and converts into json(used papaparce.js to convert csv into json) and with that data i create and populate a new document set fields, my ...
2
votes
0answers
90 views

Sharepoint JSLink Sharepoint Hosted app

I have a List with a column exam type in it. I need to use JSLink so that I can format the List using datatables. I created a custom page called Exam.aspx and added the web part to the page but can'...
2
votes
0answers
858 views

check if User field value is a user or a group using CSOM/JSOM

I am able to get a user field and its value from a list using CSOM/JSOM. I cannot figure out how to get if the value is a user or a group. ExecuteOrDelayUntilScriptLoaded(function() { var context ...
2
votes
0answers
269 views

Create site collection using jsom

I am wondering if creation of site collections with javascript on SharePoint hosted sites, is still not possible? If not, is it possible to use the site collection creation form _layouts/15/online/...
2
votes
0answers
125 views

starting JSOM workflows 2013 Invalid request / unauthorised

I have trouble starting workflows with JSOM. The first case causes errors only for some users mostly on Wi-Fi First case is : var servicesManager = new SP.WorkflowServices....
2
votes
0answers
736 views

Managed Metadata Global Navigation

I’m using managed metadata to create global navigation on a SharePoint Master Page. I understand that a managed metadata term set can only be applied to a single site collection. To bypass this I’m ...
2
votes
0answers
45 views

JSOM save indicator/semaphore (locked ListItem)

I am using standard JSOM code to update one ListItem on every keyup event Typing (too) fast causes a JSOM error (because the back-end has not yet finished saving the list-item, so it is locked I ...
2
votes
0answers
422 views

Correct usage of getListItemChangesSinceToken() in JavaScript

I'm working on a Sharepoint hosted App, that accesses List Data from the Hostweb as I outlined here: EventListener for List changes in Sharepoint Hosted app I want to use the ...
2
votes
0answers
46 views

How to make getpeerurl function always work even if ribbon is hidden in JSOM?

I want to use the getpeerUrl SharePoint 2013 function in JSOM to get the other variation URL for the current page. I have a solution here ExecuteOrDelayUntilScriptLoaded(function() { $(document)....
1
vote
0answers
13 views

Create a replica of the list from root site to subsite using JSOM Approach

we have requirement to copy the list items from root site list to the subsite list using JSOM/Rest Api Below are the reasons for which we are going through this option ' Our environment does not ...
1
vote
0answers
26 views

Activating PublishingSite feature times out and returns error but succeeds

I am trying to use JSOM to programmatically activate the SharePoint Server Publishing Infrastructure feature at the Site collection level: I ran the following script: var publishingSiteFeatureId = '...
1
vote
0answers
53 views

JSOM - Load items with fields

I've got an issue when loading data with the jsom (JavaScript). I've included all fields, I want to load: this.context.load(this.items, 'Include(ID,DocIcon,LinkFilename,FileRef,FileLeafRef,Title,...
1
vote
0answers
33 views

_spPageContextInfo.userTimeZoneData suddenly stop working

I am using many _spPageContextInfo properties in my development and it works well but suddenly from last few weeks_spPageContextInfo.userTimeZoneData is not working. User has updated timezone ...
1
vote
0answers
84 views

Custom list template not getting applied while creating List using javascript in SharePoint 2013

I am creating SharePoint list using Custom list template using javascript. and I am able to create new list successfully. but this new list is not using custom list template. it has only Title column....
1
vote
0answers
35 views

Get Other Label (synonym), description property values of a term set using REST API

I am working with the Microsoft Flow where I need to get the OtherLabel and description property values of a term-set. This term set is attached as file metadata in a document library. I tried, there ...
1
vote
0answers
26 views

How to apply cascading in below scenario using JSOM?

I Have a requirement to leverage Cascading in a little tricky way and which is where i need help. The Project I am working on, there is a Custom list called 'Company List', please see below screenshot....
1
vote
0answers
23 views

How to hide/show or Filter SP List drop down values based on a drop down value selection in another choice column in SP Online?

One of the Project I am working on, I have about three site columns: Program with choices: program 1, program 2, program 3. Program Type with choices: debt, grant, loan, equity, balance etc. Document ...
1
vote
0answers
26 views

How to call another site collection in SharePoint 2010 by jquery?

We need to get information from another site collection by jquery in Sharepoint 2010. var subFolderContext = new SP.ClientContext('http://xyz:9999/abc'); var web = subFolderContext....
1
vote
0answers
15 views

Make JSOM a High Performance deliver

I have JSOM code with some functions , Where I am also using Jquery Data table with some controls in it. My SharePoint list is having 2000 items,When I bind the data to the Jquery Data table the page ...
1
vote
0answers
53 views

How to Check if a SharePoint Item satisfies a CAML Query condition - Javascript (Rest or CSOM)

For one of my current project I am working on following requirement, Whenever a User Opens any item in SharePoint List on edit form, display form, I want to check if the item being opened satisfies ...
1
vote
0answers
41 views

How to get popular Tags using Popular Items' web-part in SharePoint online?

I want to show popular tags used across my site collection. I have tried 'Tag cloud web part' but it has been retired from SharePoint Online. To achieve this I have used 'Popular Items' web part by ...
1
vote
0answers
155 views

Sticky-header script is making the SharePoint List Filter Dialog Scrolling down

I had used the below script to hold the column headers while scrolling for SharePoint lists and document libraries as shown below. But after adding the script , Filter dialog is also scrolling down ...
1
vote
0answers
72 views

adding attachments to sharepoint list item using client side code unreliable

I used the following function to add multiple attachments to SharePoint list items created at the same time through a form function AddAttachments(itemID) { //Retrieving all the files which are ...