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
1answer
1k views

SharePoint client side people picker

When I am creating a client side people picker,it is working fine when I am pasting the name or email ID on the textbox. But when i am writing in it, it won't work and no clues are coming for the ...
1
vote
2answers
78 views

Is using an “async : wait” construction a common prectice for SP developers?

I'm just starting: (1)to code (2)for SP (3)with javascript(3) ... and my first choice was a JSOM. Once i've been trying hard to get a value from executeQueryAsync call and set it to local/global ...
0
votes
1answer
20 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 ?
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 ...
0
votes
0answers
34 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
1answer
1k views

Set value to ClientPeoplePicker

I need to set value into a ClientPeoplePicker, my list save the user as a SPUserField, I already get the id from the list. Thanks and greetings
1
vote
2answers
1k views

Set Content Type of New List Item Using JSOM

I am trying to add folders to a library using JSOM. I need to set the content type of the new library items, however I am not finding the documentation on how to do that anywhere. var itemCreateInfo ...
1
vote
1answer
597 views

SharePoint 2010 - REST - retrieve group members

I am building a form using REST and am trying to create a drop down based on a person/group field. '..ListData.svc/listNameFieldName' does not seem to work for those field types and accessing '.....
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
2answers
2k views

Import SP.js to typescript (Angular 4) application and use JSOM

I would like to use JSOM for things like creating Caml queries as I have to migrate AngularJS to Angular 4. The app is running in a WebPart. Unfortunately there is no npm package for this. How can I ...
1
vote
1answer
19 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
1k views

Getting regional settings of current user using JSOM or JavaScript

I want to fetch the regional settings of currently logged in user NOT the current web. Reason being, the regional settings and language settings is pushed through user profile service (or user might ...
0
votes
3answers
716 views

SharePoint online add user custom action to run javascript on all the pages in a site collection

How to include javascript function as a user custom action on every page in a site collection? how can we achieve this using JSOM?
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
2answers
1k views

GetItems (CamlQuery) does not return all columns in the SharePoint list/ document library with REST API POST Request

Required to get all column data with CAML query with GetItems REST API query since with the requirement of getting managed metadata term values. But its not returning all columns and values. Query as ...
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
2answers
624 views

Getting choices from choice field in Online using JSOM

I am trying to get all of the choices from a choice site column in SharePoint online. Using the following code I get to the success method but it errors out saying 'field' is undefined. I don't ...
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
37 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
28 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
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
620 views

JSOM - Update Star Ratings on Item

I've been attempting to update the rating values (shown as star ratings) for items that I am fetching from a list via REST and displaying in a Content Editor Webpart. I am essentially rebuilding the ...
0
votes
2answers
25 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 ...
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 ...
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
34 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 ...
1
vote
1answer
710 views

Error: Object not associated with an object identity

After newly creating a content type via JSOM, I'm getting the following error when calling contentType.update() or context.load(contentType): The object is not associated with an object identity or ...
0
votes
1answer
643 views

web.getList() retrives all lists. Instead of this I want only user created list

I am making Sharepoint hosted app and I am trying to get all lists appContextSite = new SP.AppContextSite(context, hostweburl); this.web = appContextSite.get_web(); //Code to get the cross domain ...
1
vote
1answer
647 views

How to JOIN two lists by lookup column in Sharepoint Online

I'm a newbie in javascript and i'm using jsom to retrieve list items in Sharepoint Online. I have two lists BnzPersons and Sessions. This is my first code variant: <div id="divListItems"></...
0
votes
1answer
643 views

REST API return encoded Multiline Textfield but show it correctly

I save a JSON string in my SharePoint list. This looks like: {"columns":[{"name":"A","visible":true,"width":200,"sort":{},"filters":[{}],"pinned":"left"},{"name":"B","visible":false,"width":150,"sort"...
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 ...
1
vote
2answers
665 views

SharePoint Designer 2013 Page accessing ClientContext issue

I have created a new aspx page from SharePoint Designer 2013 and I have following scripts added on my page head section. The page does not belong to any app, it is separate Wiki page, added from ...
0
votes
2answers
735 views

How to get sharepoint file from document library if I know file url (JSOM)?

I have url like "http://test/site/subsite/docslibrary/filename.doc" I need to get one of custom columns of file in future, so need access this file in sharepoint. Thank you
0
votes
1answer
19 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 ...
1
vote
1answer
741 views

Files move from one library to another library using jsom

Below code is working fine, but inside for-loop if I put alert,then moving multiple file but if I remove, only one file moving. I do not want any alert/pop up. Please suggest. ...
0
votes
2answers
109 views

How to get all users (name, id) from a SharePoint group including AD groups with JavaScript?

Is it possible to retrieve a list of all members of a sharepoint group, including members of included Sharepoint/AD groups using JavaScript? As far as I know it is not possible using client side ...
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
42 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 ...
2
votes
1answer
777 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 ...
0
votes
2answers
48 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 ...
1
vote
2answers
748 views

Javascript Disable event receiver firing

Are there any ways to disable event receiver firing by javascript for a list during updating data?
0
votes
0answers
21 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
64 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 ...