Questions tagged [jsom]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
19 views

JSOM to alert users about not classified files

Due to the fact that I'm not able to use any powerapps, I'm limited to use javascript to achieve this goal. I want to send and alert or email to the user, letting them know that these files have been ...
0
votes
2answers
26 views

How to move (rename) a file with the URL using JavaScript

I am using SharePoint Office 365. I have tried to extrapolate how to do this from many other sources but I am stuck. I have the URL of a file (happens to be a OneNote Notebook) and I want to move the ...
1
vote
1answer
30 views

How to add AD Security group to SharePoint Line Item Permission?

I have a few AD Security Groups (containing about 250 - 300 people in each group). I am looking for a solution to add and remove the AD Security Group to/from the SharePoint's "Line Item" permissions. ...
0
votes
0answers
9 views

Possible to get tasks based on a local custom field value using Project Server JSOM?

I have been working on a web part that lives on a SharePoint site in a Project Web App instance, and interacts with Project Server using the Project REST API. I need to be able to get tasks based on ...
1
vote
1answer
27 views

Change Content Type of Multiple files using JSOM

I have a Document Library with classic Experience with a lot of file who's content type I want to change automatically in bulk Due to the fact that I dont have access to PowerShell I was wondering is ...
0
votes
1answer
38 views

How do I run this JSOM

I was looking for ways I can automatically change the content type of my files inside SharePoint online. I go a code from Here I'm not sure how the code is supposed to work. Added a Webpart, ...
0
votes
0answers
19 views

Accessing and counting from same list only works once

I've been trying to show a count subtracted from a maximum of 35 for a seating count. I've tried everything I can think of and have come to a dead end for myself. What am I doing wrong in my below ...
0
votes
0answers
13 views

How to open an word or excel file in client application using JS?

I have a custom Page in SharePoint, where I retrieve All the documents(in .docx,.xlxs,.pdf) and show these files in a tabular format. What I want, when I click on some document(say a link button) ...
0
votes
2answers
33 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
27 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
38 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
23 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
23 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
23 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
21 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
45 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
26 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
43 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
49 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
22 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
39 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
30 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
88 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
14 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
28 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
30 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
39 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
30 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
79 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
79 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
24 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
100 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
101 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
93 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
50 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
53 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
76 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
182 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
248 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
54 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
297 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
94 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
180 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
194 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
58 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 ...