Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [jsom]

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

307 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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 ...
7
votes
1answer
348 views

How to find the last Logged-In time for the external user for a SharePoint online Site?

I need to know about the information for the external user last logged-in time over a site. Is it possible to get through REST or Client-Object Modal?
7
votes
1answer
921 views

SharePoint 2013- Anonymous users not able to read from Termstore

I have a public facing anonymous site in SharePoint 2013 on Premise. I have written some JSOM to read terms from Termstore .For authenticated users this works fine but for Anonymous users , it throws ...
5
votes
1answer
203 views

Get number of views of blog post in Blog Site using Javascript Object Model or Rest API

How to get the total number of views of blog post in Blog Site using Javascript Object Model or Rest API ? Blog Post view will be count only one time for one user.
5
votes
0answers
970 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 > ...
5
votes
1answer
1k views

SharePoint JSOM datetime values in different timezones

I am working on a solution (on SharePoint Online) which is used by users in different timezones. SharePoint site is configured for "W. Europe Standard Time". Following occurs: A user from US creates ...
4
votes
0answers
332 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
111 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
239 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. ...
4
votes
2answers
2k views

Use JSOM to get unique permissions for a folder in document library

I would like to be able to retrieve the permissions for specific folders in a document library via JSOM. Specifically, I would like to be able to use JS to determine if the active folder that the user ...
3
votes
0answers
135 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
58 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
36 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
109 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
142 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
126 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
3answers
80 views

get a value out of a function?

I am trying to get value out of java script function to a variable var isMember; IsCurrentUserMemberOfGroup("Team Management System Members", function (isCurrentUserInGroup) {...
3
votes
1answer
143 views

Unable to create subsite with SharePoint hosted app

Below is my code for creating sub site in SharePoint Hosted App: function createWebsite() { var clientContext = new SP.ClientContext("https://rootSite/sites/Site1"); this.oWebsite = ...
3
votes
0answers
458 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
1answer
68 views

Export the .aspx form as it is to Excel Custom Webpart SP2010/2013

I have to show the list of users on the page (On which the particular web part is added) that whole page have to export as it is to the Excel with formatting. So is it possible with the custom code or ...
3
votes
1answer
118 views

Sharepoint Jsom return wrong time

I have custom column, interview date, in custom list and I am storing date and time in column. When I fetch interview date data then it will return wrong time. If I store value in field 26 May 2016 ...
3
votes
1answer
278 views

Access host web data from a SharePoint add-in

I am writing a SharePoint add-in to add list items to a host web list. I use an AppContextSite object to fetch the list and add an item to it. I then try to do an appSiteContext.load(listItem) call ...
3
votes
0answers
280 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
509 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
276 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
261 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
385 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.
3
votes
2answers
93 views

Create a folder and add properties (field values) to it on form submission

I have created a simple form on SP site, on the submission of which a folder with entered name in the form would get created in the desired doc library.Library has some custom columns such as ...
2
votes
1answer
135 views

Check if a user is a member of SharePoint group JS REST API using async await

How can I check if the current user is a member of a specific SP Group using REST API and async/await? _spPageContextInfo.webAbsoluteUrl + "/_api/web/sitegroups/getbyname('" + grpName + "')/...
2
votes
0answers
444 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
521 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
351 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
92 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
54 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
308 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
109 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
36 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
2answers
254 views

Add attachments in to SharePoint flist using JSOM without using FILEREADER

We are having options to upload attachments/files in to document library or to list as attachment with the help of JSOM by using FILEREADER object. FILEREADER is available only after IE10 versions. ...
2
votes
0answers
51 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
219 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
1answer
440 views

JSOM, Calendar Recurring task: “Item does not exist. It may have been deleted by another user.”

I create calendar recurring tasks with JSOM(SharePoint 2013 on-prem). It works, and I can open this item from "All Events"(not "Calendar") view. But if opened in "Calendar" view - it gives "item ...
2
votes
1answer
112 views

update people and group list item by name and dont have user id/user name/email id Sharepoint 2013 by providing name in JSOM

In my current scenario am having an excel with all the metadata and person name. This details I have to upload to Sharepoint 2013 list using JSOM. Am not sure how to handle people and group column ...
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
923 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
278 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
127 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
2answers
463 views

Add default value to the site column inside content type using javascript Sharepoint 2013

I am creating some site columns using javascript. And also I am creating content types. I am attaching these site columns to the content type with the <FiedRef> tag. But I want different default ...
2
votes
1answer
853 views

Sharepoint CAML IN operator not working with FileDirRef

I want to retrieve a list of file from two folders. When I combine two <Eq><FieldRef Name="FileDirRef" />... with <Or> it works fine. When I want to use the <In> operator it ...
2
votes
0answers
771 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 ...