Questions tagged [jsom]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
3 views

jQuery().SPServices “CopyIntoItems” ignores 'Fields' parameter and stores linked file in “_CopySource”

I'm trying to copy file with SPServices but my file stays 'linked' (if You open details - SharePoint says this is a copy and offers to unlink). I got my new item with another query and tried to ...
0
votes
1answer
17 views

CAML Query “Neq” not working with choice field

I an writing one CALM query as below. But seems like Neq is not working for choice field. I am getting wrong results. Does anyone know the work around. <View><Query><Where> <...
0
votes
0answers
18 views

File not found error JSOM Sharepoint file uplaod

The code was working perfectly and suddenly this error: "Request failed with error message - File Not Found. Stack Trace - undefined" comes out, can some please help me? onFileSelected(event) { ...
0
votes
2answers
23 views

Enforce File Naming Convention in a Folder inside a Document Library SharePoint Online

SharePoint Online specific. I wanted to know if it is possible to enforce file naming conventions at the folder or sub-folder level in a Document Library. For example, I have a Document library ...
0
votes
0answers
10 views

Fetch my approved tasks as a group member using Rest API

I am having an approval workflow in which I assign a task to a group using SPD designer workflow when any member of the group approves the task, the task gets completed. Now, my question is, I have ...
0
votes
0answers
12 views

Loading thread from SharePoint Discussion Board into Smart Alert

We have set up Infowise Smart Alert on our SP 2016 site to alert users when new discussion items or replies are added to a discussion board. Right now, Infowise Smart Alert currently only sends the ...
0
votes
1answer
19 views

JSOM and authentication

I am developing an Outlook Addin (JavaScript). I need to also use JSOM to connect to OneDrive for Business in that addin to upload a file. I don't know how to authenticate to use JSOM. Is there any ...
0
votes
1answer
18 views

Uncaught TypeError: visitorIDs.push is not a function

I am trying to build an array of the ID's of the users in a peoplePicker Field by using push. So far I'm not having much luck as I'm getting this error: "Uncaught TypeError: visitorIDs.push is not ...
0
votes
2answers
36 views

How to get users email address from person or group field - using JSOM

I have a field called Employee and it's a person and group field. How can i get the users email address if i have the display name or the user id. Any tip/help will be appreciated See my snippet code ...
0
votes
1answer
14 views

Copy list item and create a new one in the same List using JSOM

I have a list with items. I have added a button in the ribbon, which is opening a confirmation page(dialog window) if user is sure that he want to create a new item from the current one and redirect ...
1
vote
1answer
28 views

Hide document library from Quick Launch using JSOM

I am creating Hidden document library using SharePoint hosted App and i have to hide this hidden library from quick launch. I used below code but it's not working. function createDocumentLibrary() {...
1
vote
1answer
36 views

getting TypeError: allGroups.getByName is not a function

I am using this code example to redirect a user based on group, but I am facing this error message: TypeError: allGroups.getByName is not a function my code: <script src="https://ajax....
0
votes
0answers
20 views

How to call a sharepoint online hosted site from a independently hosted html site using JSOM?

I need to call a sharepoint online hosted site(created as a developer site) from a independently hosted html site containing JSOM and display the list items present on the sharepoint hosted site in ...
0
votes
1answer
27 views

How to make rest call to _vti_history for getting any previous version file in SharePoint

I want to make rest call or implement some JSOM mechanism to retrieve previous version file from _vti_history. For example: _vti_history/1024/Documents/Filename.docx Please guide me if this is ...
0
votes
0answers
12 views

Can we restore a document version in different share point library using jsom?

I want to know if we can restore/move specific version file using JSOM/REST to different library other than source library? Thanks, Kailash
0
votes
2answers
39 views

Get previous version file using JSOM in share point 2013

I want to get the previous version file using java script object model in SharePoint 2013 environment. Please guide me if any one is already worked on similar requirement. Thanks, Kailash
0
votes
1answer
24 views

Get file of specific version using JSOM in share point 2013

I want to get the file of specific previous versions using java script object model in SharePoint 2013 environment. Please share the code if any one is already worked on similar requirement. Thanks, ...
1
vote
1answer
36 views

Change Sharepoint task parent id via REST

I'm trying to move a subtask from one parent to another. I could change the tasks name with such a PATCH query: PATCH /sites/PWA/_api/ProjectServer/Projects('4b951130-e0b9-e911-910f-001dd8b71c8d')/...
0
votes
0answers
26 views

'n' number of CAML queries in a single executeQueryAsync function

How to execute 'n' number of CAML queries to get a different list of objects? We can use multiple clientContext.load() if we have a defined number of queries like clientContext.load(collListItem); ...
0
votes
2answers
20 views

ClientContext showing data as undefined

I had some code similar to this one for getting data from property bag. However, I am getting some error that my variables are undefined. Even site and web are shown as undefined. What could be the ...
0
votes
1answer
30 views

Check if user has specific permission

I am using SharePoint server 2016. I want to check if logged in user has specific permission or user lies into specific permission group. So I trying to fetch using EffectiveBasePermissions. Code: ...
1
vote
1answer
52 views

Retrieve Date from Date/Time Field in SharePoint List with Javascript?

I am trying to pick up the date for each item in a list but I cannot seem to figure out all to get the value. I am using: var startDate = listEnumerator.get_current().get_item('Start_x0020_Date')
0
votes
0answers
11 views

Several SharePoint page throw error regarding sp.js after turn off and on MDS

We are using SharePoint 2016 on-premise. MDS (Minimal Download Strategy) is activated as default. Several .aspx pages contain JSOM functions are running fine there. One day, we want to test the ...
1
vote
1answer
46 views

JSOM in React, 'SP' is not defined no-undef

I am making some tests in order to update a page on sharepoint on premise 2013. The goal is to use reactjs to modernize this page. However, when I try to use JSOM, especially to create an item, I ...
0
votes
1answer
26 views

Add jquery reference to JSlink file

I am using JSLink feature of SharePoint 2013, My JSLink file has code to get current user id and other details, for this I need to add reference of jQuery file. I tried adding those files in in ...
0
votes
1answer
30 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
40 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
37 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
1answer
26 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
31 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
39 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
20 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
18 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
38 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
31 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
27 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
53 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
25 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
25 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
128 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
35 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
85 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
73 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
31 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 ...
1
vote
1answer
63 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
33 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
176 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
46 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