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.

0
votes
0answers
6 views

How to create a folder and a folder inside a folder using REST/JSOM/Flow in a Custom List (Not a library)?

The requirement is: When an item is created in a custom list, a folder should be created with the same name as Title of the item and the item should be placed inside the folder.
0
votes
1answer
21 views

How to get specific listview data with javascript?

I got a list and a list view. But I want to retrieve only particular list view's data. How can i do that with javascript ?
0
votes
0answers
36 views

SharePoint 2013 - Custom mention people with SSOM

We are developing a new blog post implementation and it will work like as microfeed. On the other hand we just wanted to implement mentioning feature and we wanted to implement it at the backend side. ...
0
votes
0answers
17 views

Can not update user profile property using CSOM for SharePoint onprem

I am trying to update user profile property using CSOM for SharePoint onpremise, but the value was not updated to the property. There is no error exception. I try with JSOM but it does not work also. ...
1
vote
1answer
21 views

Button, updating a list item at the Display Page

I am trying to create a button on the Display Page where it will update a value (Open, Close, Cancel), either redirecting them back to the Display Page or just taking them back to the List Page. They ...
1
vote
1answer
22 views

Why is Last Modified and Modified having different data?

I am trying to retrieve data using the JSOM model, and trying to figure out the last modified date of a SharePoint List Item, Its really strange when I am trying to retrieve the Last Modfied Date ...
0
votes
1answer
19 views

JSOM get site from GUID

Using JSOM how can get the URL like the powershell script below using the site GUID $web = get-spweb -Site 87d28faf-a0ac-4ac6-80a1-96aca53d07b7 $web.Url Thank you.
2
votes
1answer
31 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 + "')/...
0
votes
0answers
18 views

Loading _Sys_Nav_HoverText with REST

I'm building a SharePoint 2016 app with a custom site map menu that utilizes the site's managed navigation. How do I retrieve the "Navigation Hover Text" value? I'm using the REST API to retrieve the ...
0
votes
1answer
39 views

Inserting dynamic data in a sharepoint list using jsom

I am trying to insert dynamic data (question number, question and answer checked) to a new sharepoint list. The data needs to be read from another list, i.e. "Questions1List". I have a quiz page in ...
0
votes
0answers
38 views

Inserting multiple rows in a SharePoint list using JSOM

Hi I am trying to insert the data in the form of multiple rows to a SharePoint list. I retrieved question number, question, choice answer options as shown in image. Now, I want to insert the question ...
0
votes
1answer
19 views

SP.js loading issue while retrieving list items using JSOM

Hi I am trying to retrieve list items using JSOM. But, the problem occurring is that SP.js is not loading correctly. It shoul load before the function gets executed. I am confused about where to use ...
0
votes
1answer
30 views

Use JSOM to retrieve id of newly inserted item

I am using JSOM and would like to retrieve the id of the newly inserted item. I've tried a few things and nothing has worked. Any help you can provide would be much appreciated. var clientContext ...
0
votes
2answers
26 views

Help stopping a SharePoint Workflow with JavaScript

I'm attempting to write a script that will cancel and start workflows when an error happens. I found this section of code on different sites but have not been able to get it to work. After stepping ...
0
votes
1answer
39 views

Can I use elevated permissions using JSOM, CSOM, or REST?

I am working with an On-Premise SharePoint 2016 farm and I am looking for some way to elevate permissions, so I don't use the logged-in user's credentials but another set of permissions that the ...
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 ...
0
votes
0answers
19 views

Accessing the Secure Store Service using client-side code

Using JSOM or REST can I access the credentials in a Secure Store Service? I have a on-premise SharePoint 2016 Enterprise farm. And it will be accessed internally from a windows domain
0
votes
1answer
28 views

How to open an Excel file in Excel online on button click in SharePoint Online?

I need to open an excel file in Excel online on a button click which I retrieves from Document library . I have followed this, but it shows me an Error page like 'Item does not exist. It may have ...
0
votes
0answers
18 views

How to share SharePoint online page on social media?

How to share SharePoint online page on social media (Facebook, Twitter and LinkedIn) programmatically (JSOM or REST API) so that everyone (external users) can see the content of this page without ...
0
votes
1answer
34 views

RangeError JSOM set_item update

I tell you that I have been fighting with this bug a few days ago. He is winning ... On the EditForm I have a grid that points to another sherpoint list. I can add listitems to that other list or edit ...
0
votes
1answer
20 views

How to set multi value metadata list field using jquery?

How to set multi value metadata list field using jquery? I am trying to update the vaule by passing term name and term ID. I am able to save single value but throwing error with multiple values: ...
0
votes
1answer
29 views

remove all users from a SPGroup on Save button click in NewForm.aspx using CSOM/REST

on save button click of my newsplist newform.aspx, i need to remove all the users from the custom spgroup. i tried with REST API, but there is no method to delete all users from the group! its allows ...
0
votes
1answer
28 views

How to get comments of item by using CSOM 2013?

I retrieve all items by using this code: var oList = context.Web.Lists.GetByTitle(title); CamlQuery camlQuery = new CamlQuery(); camlQuery.ViewXml = "<View Scope=\"RecursiveAll\"></View>";...
0
votes
1answer
47 views

Can i get distribution list of current user in SharePoint using JSOM or REST API

I have written a logic to check if the current user belongs in a Specific SharePoint Group e.g. "Visitors". However this user is present in the DL and the DL is added in the SP group, e.g. DL-Org. The ...
0
votes
2answers
56 views

Export SharePoint online list to Excel

I know there is an OOTB functionality to export list into .iqy file that can be opened in Excel. But here we want to export the list using JSOM/REST to a file which has .xls format. I have gone ...
0
votes
1answer
19 views

How to set all one column's default values to 0?

I have a document library in our site. I have a column and I want to set the column's default value to 0 at first. But it is empty. My column is integer column that stores numbers. How can I do ...
0
votes
0answers
23 views

2016 - SPField.FieldRenderingControl equivalent to CSOM or JSOM

Using the Microsoft.SharePoint, I can render SP Fields in custom application page using the below server side code. BaseFieldControl editControl = field.FieldRenderingControl; editControl.ID = field....
1
vote
1answer
67 views

Export multiple lists into a single CSV file

I have a requirement to fetch 2 large lists and merge data into a single CSV file. Suppose Lists are as below : List A Column1 Data1 Data2 List B Column2 Data3 Data4 Then Data should be displayed ...
3
votes
0answers
85 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 ...
1
vote
2answers
67 views

Change Sharepoint group setting using JSOM or REST

I am looking for JSOM or REST option to update SharePoint user group settings who can edit the membership for the group.
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
1answer
46 views

How to fetch version history of list item and display in a list

I have requirement where I need to fetch the version history of each list item and display in a separate list where a specific column value has been changed. For Example: I have list named "Demo" and ...
0
votes
1answer
41 views

Build caml query in javascript in sharepoint designer

<script type="text/javascript"> $(document).ready(function () { var listName = "Leave Request"; var context = new SP.ClientContext.get_current(); var list = context.get_web()....
0
votes
1answer
64 views

Retrieve items from a SharePoint All list using JavaScript Object Model (JSOM)

How do I get list item ( 4 list ) using the javascript object model? Relevant code as follows : <script src="/JS/jquery-3.0.0.min.js" type="text/javascript"></script> <script type="...
3
votes
1answer
132 views

list 'user information list' does not exist at site with url http://siteurl - SharePoint 2016

I am trying to get the data from User Info list using below JSOM code. but the issue is, it returns the data only when owner group user logged in to the site, for a visitor or even site members are ...
0
votes
1answer
162 views

Export sharepoint list items to excel by passing item ID as parameter using javascript

I have multiple filters on the page which gives me results, My objective is to provide an export link somewhere on the page which should have url with Id(s) as the parameter, thru which user can ...
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,...
0
votes
2answers
210 views

Check if People picker has any value on document.ready of EditForm.aspx in jsom sharepoint 2013

I am trying to set a Person or Group field value only if it is null. I am checking this on document.ready() of EditForm.aspx of listItem, where If its null, then I want to set its value to currentUser ...
1
vote
2answers
92 views

Beginner question on Updating List Items using JSOM, REST and Sharepoint Online

After doing a lot of research on REST, I'm stuck. Any help would be appreciated. I want to users to be able to update the status of a Task by clicking a button which takes them to a url. The column ...
0
votes
1answer
120 views

Date range filtering in a list using JSOM

I want to add a date range filter on a list/library. I tried with the out of box date filter web part but it is causing some issue as search box disappeared & no items in the list if the value is ...
0
votes
1answer
153 views

Spfx dropzone component

I am using the sample react-file upload sample and upon and upload am changing the metadata of the file. The catch is it is working when am testing and when the app is deployed it no more works.The ...
0
votes
1answer
44 views

Can someone help me on how to handle CORS to access other site collection in SharePoint online?

Scenario: I have one Site Collection in abc.com domain and other Site Collection I have inside xyz.com domain. Now I want to access list item from abc.com domain inside xyz.com domain. Both Sites are ...
1
vote
1answer
202 views

PreSaveAction for Quick Edit Mode

I have build some scripts running in the PreSaveAction function for example to validate some data or conditionaly send an email via ajax call. Now I need this functionality when the user creates a new ...
1
vote
1answer
271 views

How to get ClientContext in Sharepoint Online with JSOM

var context = SP.ClientContext.get_current(); throws this error, Uncaught ReferenceError: SP is not defined the snippet works fine in SharePoint 2013, Are there .js that I need to load? if yes, ...
1
vote
1answer
64 views

How to get item ids when using JSOM (when not it in content.executeQueryAsync)

is it possible to get item ids when not using executeQueryAsync. See my code below. I would like to get the item ids as i'm doing below in successGetListItemId() but would like to store in an array ...
2
votes
2answers
40 views

Display account info in SharePoint web part

can we get the user profile details in web part using JSOM I am looking for a profile web part to show this info user profile image user email user job title user extension any help would be ...
0
votes
1answer
42 views

Dynamic calling function to read data from SP List

I'm trying to do something similar to this, but with a dynamic calling function name so that I can reuse the function. I followed Danny's suggestion, but I am getting the error: Uncaught TypeError:...
1
vote
2answers
590 views

how to get the user profile properties of the user who has modified the item in the display form?

we have requirement to customize the display form. we need to show user profile properties for the user who has modified the item in the display form. any help would be appreciated.
0
votes
2answers
140 views

How to create a list item using javascript

I found some code to put a stopwatch on a site page. I want the user to enter their name and the task they are performing and start the timer. When they stop the timer I want the Name, Task and Time ...
0
votes
1answer
29 views

SharePoint JSOM display next 6 items on each scroll event

We have a requirement to show 6 items from SharePoint list on scroll event. That is: On each scroll event we need to show the next 6 items in a div section Has anybody worked on this type of ...