Questions tagged [jsom]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
13 views

Are there any dependencies for PS.js (Project Server JSOM)?

Because I can't seem to do what I need to get done using the REST API, I am going to try to use the Project Server JSOM in an SPFx webpart. I found instructions on how to load the SharePoint JSOM ...
0
votes
1answer
30 views

How to retrieve the SP list items without using CAML Query?

I have a SharePoint list and I need to get all items from that list without using CAML Query in JSOM. How can I do this?
0
votes
1answer
27 views

Fill SharePoint list element field (people picker) with JavaScript

I want to add a list element via JavaScript which works (almost). After the help from a user here I got this function fillStandard() { console.log("Standard"); var posInvest = "Invest"; ...
0
votes
1answer
29 views

Adding list element via JavaScript gives error

Please note that I'm doing this for the first time. I want to add an element to a list via JavaScript. Therefore, I tried this: function fillStandard() { console.log("Standard"); var ...
0
votes
2answers
31 views

How can I add CommandBar buttons in SharePoint online using JSOM?

As shown in figure I want to add button (right side by send by mail) on each CommandBar in SharePoint site?
0
votes
1answer
16 views

Import more than 10000 records from excel to sharepoint list using client side scripting

I have 32 columns and 10000 more rows. And i tried using xls.core.min.js to import data to sharepoint list. At a time i can import 4000+ only. After that it got aborted. I have checked the below site. ...
0
votes
0answers
7 views

Get all workflow tasks and their outcome associated with a SP2010 and SP2013 workflows that are operating on a given list item through JSOM or REST

I would any help that could be provided. Is this even possible (even if in separate REST or JSOM calls)?
0
votes
0answers
12 views

Display a custom Task List with Hierarchy using JSOM

We have a Task List sorted and organized with some hierarchy. We are trying to show it in a custom webpart. Unfortunately, I could not show it as it is in a Calendar View. Task 1 Sub Task 11 ...
0
votes
2answers
53 views

Access denied when adding or removing user from SharePoint user group

I am using SharePoint 2013 online. We have SharePoint groups and there the group owner can successfully add or remove the users. But when accessing the user groups through JSOM in my angular app ...
0
votes
2answers
41 views

multi call of SP.SOD.executeFunc

the problem is very clear that the call of SP.ClientContext and sp.js isnot done yet. Actually, In my master page there is the code to get those two : SP.SOD.executeFunc('sp.js', 'SP.ClientContext', ...
0
votes
0answers
31 views

Remove users from group with javascript

I found a script to add a user to a SP group with a button. Now I would like to have a second button that does the opposite (remove the user from the group). The first thing (adding an user) works. ...
0
votes
1answer
33 views

SharePoint training options

I'm looking for training in the SharePoint 2013/2016/2019 on-premises sphere with specific concentration on BCS solutions developed using JSOM and REST models. Does anyone have a recommendation they ...
0
votes
0answers
17 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
44 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
27 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
121 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
14 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
27 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
24 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
74 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
19 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
33 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
45 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
61 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
13 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
42 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
65 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
44 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
1answer
29 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
25 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
39 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
134 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
12 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
124 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
60 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
91 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
43 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
74 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
38 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
40 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
21 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
39 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
37 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
40 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
31 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
77 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 ...