Questions tagged [jsom]

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

0
votes
0answers
4 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
22 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
27 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
6 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 ...
2
votes
1answer
593 views

Approve Permission to list item in SharePoint 2013

I have to set approve permission using JavaScript client object model. I have used below code to set other permission. But for Approve it is not working. function breakSecurityInheritance(lastItemId)...
2
votes
1answer
868 views

Remove list item permissions by role type using JSOM

I'm looking for a good way to remove all list item permissions on a certain list item of a specific role type using the JavaScript object model. With myListItem.get_roleAssignments().getByPrincipal(...
0
votes
3answers
914 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
25 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
37 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, ...
2
votes
1answer
825 views

How to copy a file from one site collection to another site collection using JSOM ,in a Sharepoint Hosted app?

I have to create a sharepoint hosted app (Office 365) for copying a latest version of a file from one site collection to another site collection under the same tenant, using JSOM. Can someone direct ...
0
votes
1answer
904 views

Uncaught TypeError: web.get_url is not a function

When trying to execute the following code i got the mentioned error. Here is the snippet: var clientContext = new SP.ClientContext.get_current(); var web = clientContext.get_web(); clientContext.load(...
1
vote
2answers
934 views
0
votes
1answer
952 views

Overwrite with SP.MoveCopyUtil

I can't get the overwrite paramreter in SP.MoveCopyUtil.copyFile to work. I can't find any good documentation on it either. Heres the code. appObj.copyFile = function (source, path, fileName) { var ...
1
vote
1answer
723 views

Uncaught Error: Sys.ArgumentNullException: Value cannot be null. SharePoint 2013 JSOM

I am trying to retrieve items from a Sharepoint 2013 list using JSOM with CAML query. camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name=\"Title\" /><...
0
votes
0answers
18 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
10 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
29 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
2k views

How to get Term via multiple custom properties through JSOM?

I am trying to get terms by multiple custom properties via JSOM. For example: i have a term with always two custom properties TABLENAME DB_ID I want to query a TermSet or filter a TermCollection by ...
0
votes
2answers
1k views

How to add the custom Data to calendar list in sharepoint 2013?

I created the Customs Form as a web part, In that form, there have Several Fields like Title, Location, Date and Time picker, Description, Images and URL. After Filling the Form, a user clicks publish ...
0
votes
1answer
1k views

How do I get all current users from a site

I need to get all currently active (not removed users) from a site. I have the following JS that gets all the users but some of them are old users that have been removed from the site (still exists in ...
1
vote
2answers
1k views

How to show unique values in a lookup column?

One of the Projects I am working on, I have a site lookup column being used in many libraries across various subsites. The list column to which the lookup column is referenced to has some duplicate ...
1
vote
2answers
593 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
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
82 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
26 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
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
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
605 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
22 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
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
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 ...
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
20 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
42 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
651 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
24 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
42 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
48 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
32 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
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
643 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
28 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
24 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
63 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 ...