Questions tagged [jsom]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
660 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
16 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 ...
1
vote
2answers
696 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
814 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
1
vote
1answer
783 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. ...
2
votes
2answers
601 views

How to get file author name and last major version in sharepoint hosted app?

I am developing SharePoint Hosted App to get specific file's all properties like author, created time, modified time, last major version etc. I didn't get the author name of file and I got SPUser ...
2
votes
1answer
801 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 ...
1
vote
2answers
764 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
1answer
20 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
27 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
31 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
11 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
596 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
877 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
1k 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
27 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
38 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
830 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
917 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
950 views
0
votes
1answer
972 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
741 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
19 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
13 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
36 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
595 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
83 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
27 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
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
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
612 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
25 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
25 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
24 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
21 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
54 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
659 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
26 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
46 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
51 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 ...