Questions tagged [sharepoint-jsom]

The JavaScript Object Model (JSOM) is a SharePoint Client Object Model that enables you to work with objects on the client side without having to deploy code on the server.

135 questions
1
vote
1 answer

Retrieve the custom user profile properties using JSOM with rest api and display it into a SharePoint page

How to retrieve the custom user profile properties using JSOM with rest api. As i need to retrieve Employee Cost Center(Custom property) of current login user but the below code is not working.
taps bops
  • 43
  • 6
1
vote
2 answers

Get all lists and list items in a SharePoint site with JSOM

I have a SharePoint site and I want to use JSOM to get all lists, and get all items in each list. I have tried this approach: Get all lists in the site, store their IDs For each list ID, get list items Pseudocode is as such: for each id in…
Jesse Lynn
  • 325
  • 5
  • 15
1
vote
0 answers

Optimize JSOM Query

I have the following SharePoint 2016 JSOM query that retrieve the list item based on the current user email...this query currently works, however, I have been doing some study around using jquery defferred and Promised objects. In order to…
user989865
  • 627
  • 3
  • 9
  • 25
1
vote
3 answers

How to insert more than 5000 items in SharePoint list using JSOM?

I am trying to add 5000 items in a SharePoint list using JSOM. But unfortunately didn't get any luck. function createListItem() { var clientContext = new SP.ClientContext.get_current(); var oList =…
1
vote
0 answers

Issues with List View inside Client Web Part in SharePoint Hosted App

I have a Client Web Part (App Part) created using SharePoint Hosted App, which reads and displays contents of a Custom List View from Host Web inside the App Part Page using JavaScript Object Model(JSOM). I used renderAsHtml() method for rendering…
Itsme
  • 67
  • 4
1
vote
1 answer

How do I get the return value from executeQueryAsync?

I cannot work out how to get a return value from the method below. I am adding items to an array. That works fine. I just cannot get the array returned from the function. var termList = loadTerms(termSetId); function loadTerms(termSetId) { …
Tony
  • 1,394
  • 5
  • 22
  • 48
1
vote
1 answer

Sharepoint How to identify your current site is rootsite or subsite (level of subsite)?

I use "_spPageContextInfo.webAbsoluteUrl" to detect the site url. From root site: _spPageContextInfo.webAbsoluteUrl, the result is "http://mywebsite:8888" From subsite level 1: _spPageContextInfo.webAbsoluteUrl, the result is…
anhtv13
  • 1,636
  • 4
  • 30
  • 51
1
vote
2 answers

SharePoint userProfileProperties JSOM (JavaScript Object Model)

I am tryin to get some info from PeopleManager.getMyProperties() function. I get the object,some values are null.when i check it from User Profile from Management,I can see the value. How can i fix this one ? There is my working code to get…
1
vote
0 answers

How to load SharePoint Online Termset using JSOM?

I want to retrieve SharePoint Online termset using JSOM. I have a script , however, it doesn't automatically load the termset when the DOM is ready and I have noticed that I have to do a hard refresh (crtl+F5) on the browser before the termsets are…
user989865
  • 627
  • 3
  • 9
  • 25
1
vote
0 answers

Bind SharePoint termset to Bootstrap multiselect

I am trying to bind SharePoint online terms retrieved using JSOM to jquery multiselect dropdown control without luck below is my current code to get the terms and bind to the multiselect contorl. HoweverWhen the page load to terms are binded to the…
1
vote
3 answers

Reading ListItems inside folders from Sharepoint list( not library)

How to read sharepoint list items from a specific folders using Javascript/Jquery through JSOM or REST?
F11
  • 3,703
  • 12
  • 49
  • 83
1
vote
1 answer

JSOM - Sharepoint - How to remove all permissions on an item of a list after breaking the inheritance?

I'm trying to add a script on a sharepoint page to help users to manage permissions. The script have to break inheritance (no problem) and change the permissions (problem) on some doc set in a library. To manage permissions, I have to do 2 things…
Lyd
  • 13
  • 3
1
vote
0 answers

SPFx how to update Enterprise Keyword Column, JSOM, CSOM, REST?

I am using SharePoint Online and try to build a SPFx WebPart. I am able to retrieve Enterprise Keywords stored in my InteractionLogList, with Label and GUID. As well I am able to retrieve all the Taxonomy Keywords with Label and GUID. Therefore I…
Dennis Kuhn
  • 239
  • 3
  • 10
1
2
3
8 9