Skip to main content

Questions tagged [jsom]

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

326 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11 votes
1 answer
4k 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 ...
Scott Cochrane's user avatar
8 votes
1 answer
1k 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 ...
Unnie's user avatar
  • 8,819
7 votes
1 answer
441 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?
user27178's user avatar
  • 372
5 votes
1 answer
326 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.
Ronak Patel's user avatar
  • 3,251
5 votes
0 answers
2k 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 > ...
eirikb's user avatar
  • 7,415
5 votes
1 answer
2k 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 ...
Suleyman's user avatar
  • 708
4 votes
0 answers
349 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 ...
billyjimjack's user avatar
4 votes
0 answers
370 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 ...
Florian Leitgeb's user avatar
4 votes
0 answers
118 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 ...
Marmalade's user avatar
4 votes
0 answers
276 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. ...
SynozeN Technologies's user avatar
3 votes
0 answers
68 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 ...
Rothrock's user avatar
  • 3,010
3 votes
0 answers
40 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.
Y. Jagtap's user avatar
  • 323
3 votes
0 answers
295 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 ...
codemirror's user avatar
3 votes
1 answer
177 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 ...
SP-Mzoooooo's user avatar
3 votes
0 answers
186 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 ...
Mokone Tsiloane's user avatar
3 votes
3 answers
86 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) {...
HAJJAJ's user avatar
  • 275
3 votes
1 answer
148 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 = ...
DRS's user avatar
  • 722
3 votes
0 answers
485 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() { ...
Daniel Lewis's user avatar
3 votes
1 answer
91 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 ...
Ram's user avatar
  • 2,444
3 votes
1 answer
191 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 ...
Jinesh Kaneriya's user avatar
3 votes
1 answer
286 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 ...
cmoody4's user avatar
  • 143
3 votes
0 answers
392 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 ...
Dylan Cristy's user avatar
  • 12.7k
3 votes
0 answers
546 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 ...
GW - SharePoint Developer's user avatar
3 votes
0 answers
321 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 ...
Anders's user avatar
  • 969
3 votes
0 answers
323 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?
anomepani's user avatar
  • 237
3 votes
0 answers
466 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.
user42173's user avatar
3 votes
2 answers
322 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 ...
Pankaj Kore's user avatar
2 votes
0 answers
323 views

Need to check if link exists for any given SharePoint URL using RESTAPI or CSOM

I am using SharePoint 2013 Online. The requirement is, for any given SP Online URL I should be able to verify if it is broken or not using client side code/script not server side code. Please help me ...
Kailash Sahoo's user avatar
2 votes
0 answers
915 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 (...
Nadeem Yousuf-AIS's user avatar
2 votes
0 answers
721 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 ...
Rothrock's user avatar
  • 3,010
2 votes
0 answers
694 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 ...
Keshav Taurah's user avatar
2 votes
0 answers
131 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 ...
Frikk Fossan's user avatar
2 votes
0 answers
58 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({ ...
Ram's user avatar
  • 2,444
2 votes
0 answers
433 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 ...
Rajeev Kumar's user avatar
2 votes
0 answers
121 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 ...
Tortoise's user avatar
  • 123
2 votes
0 answers
52 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: ...
SP Developer's user avatar
  • 3,085
2 votes
2 answers
323 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. ...
karthick 22's user avatar
2 votes
0 answers
61 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 ...
Jake's user avatar
  • 582
2 votes
0 answers
36 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 ...
MickB's user avatar
  • 1,491
2 votes
0 answers
285 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 ...
Juansei's user avatar
  • 103
2 votes
1 answer
763 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 ...
Gennady G's user avatar
  • 1,623
2 votes
1 answer
129 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 ...
Mukesh M's user avatar
2 votes
0 answers
92 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'...
user64002's user avatar
2 votes
1 answer
1k 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 ...
IMTheNachoMan's user avatar
2 votes
0 answers
296 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/...
Lennard's user avatar
  • 31
2 votes
0 answers
143 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....
Ondřej Čech's user avatar
2 votes
2 answers
834 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 ...
Mihir's user avatar
  • 1,546
2 votes
0 answers
179 views

How to Create New Field with Specific different Internal Name and Display name in SharePoint 2013 Client Object Model

When creating a new field using Fields.AddFieldsAsXml, I used below code : <Field Type='Text' DisplayName='Employee Number' Name='EmpNumber' /> But the Internal Name of the created field. "...
swati patil's user avatar
2 votes
1 answer
2k 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 ...
Romain's user avatar
  • 21
2 votes
0 answers
854 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 ...
user3462522's user avatar

1
2 3 4 5
7