Skip to main content

Questions tagged [jsom]

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

Filter by
Sorted by
Tagged with
0 votes
2 answers
893 views

Retrieve user info from azureAD profile

Could anyone suggest some way to retrieve user info from AzureAD using JSOM or REST API only..
Tezz Chaudhary's user avatar
1 vote
1 answer
57 views

Login name of current user by JSOM

I have a SPFeatureReceiver that adding to calendar item new button in ribbon: SPUserCustomAction getTheTerm = list.UserCustomActions.Add(); getTheTerm.CommandUIExtension = $@" <CommandUIExtension&...
Karol Kozłowski's user avatar
1 vote
2 answers
83 views

SharePoint get_item("my_note_field") is null for some and not for others

I have built a SharePoint app that allows users to construct a query, run it, and export the results as an xlxs file. It seems that all the parts of the app work exactly as I intended, with the ...
fce_sp's user avatar
  • 25
0 votes
2 answers
31 views

are there any sharepoint js core libs source maps around?

I see that we can download the debug versions of the js sharepoint libs. https://static.sharepointonline.com/bld/_layouts/15/16.0.19925.12013/core.debug.js Since running them from Sharepoint online ...
Ricardo Silva's user avatar
1 vote
1 answer
255 views

args is undefined on executeQueryAsync query failed

I'm trying to make a JavaScript query on SharePoint 2010 via the following code. On query success I got no problem, but if query fails I get "args is undefined". All examples I see works same way I ...
Albert Balasch's user avatar
0 votes
1 answer
66 views

Can't get Organization Name from AD

Good day, I have a question with getting user profile data from AD by JavaScript for SharePoint Display Form. I can get user Department by script: <SharePoint:ScriptLink ID="ScriptLink2" name="SP....
Anonymous's user avatar
0 votes
1 answer
1k views

Get SharePoint user ID from name or email using JavaScript

I am building a JavaScript web part that queries a SharePoint list and generates a report based on the list data. I want to be able to get the user ID for a given user by their name or email. input - ...
fce_sp's user avatar
  • 25
0 votes
1 answer
98 views

SP.MoveCopyUtil unavailable for use (SPO JSOM)

I am trying to use JSOM to programatically move existing files in a document library to a document set within the same library. I think I should be able to use SP.MoveCopyUtil.MoveFile for this ...
user6009780's user avatar
0 votes
1 answer
146 views

Create new file, "The file *** is not checked out"

I get the error The file "Style Library/FILENAME.js" is not checked out. when uploading a new file (FILENAME.js) using the following code. var uploadFile = function (sourcefolder, scriptName) { ...
moviaa's user avatar
  • 111
0 votes
3 answers
109 views

Why does my oListItem.get_id() return -1 even though executeQueryAsync succeeded on creating of list item?

I created a function that adds an oListItem with some lookup columns as shown function on_click(){ console.log("creating new assessment") var siteUrl = _spPageContextInfo....
iNeedTea's user avatar
1 vote
1 answer
40 views

How can I fetch only AD groups not SharePoint Groups with REST API or JavaScript?

I want to fetch the a user's membership and AD groups (Not SharePoint Groups). So, how can I fetch the data using REST API or JavaScript?
f_gulay's user avatar
  • 651
1 vote
1 answer
109 views

Read Comments in Tasks via JavaScript

I am trying to read the comments of a task list in SharePoint 2016 by using JavaScript. Right now I get the latest comment using: var comment = oListItem.get_item('Comments'); But how can I read ...
cvb's user avatar
  • 81
0 votes
0 answers
67 views

When to use JSOM over REST API

Is there any specific scenario where I should use JSOM instead of REST while doing SharePoint development? I want to know is there any limitations for SharePoint REST API when comparing to JSOM.
Jefin Mathew's user avatar
0 votes
2 answers
203 views

How to store more than 5k items in List.How to deal List Throttling issue in JSOM Sharepoint Online?

I have a list in SharePoint online having more than 5000 items. How to deal it with JSOM or REST API.
user3868213's user avatar
0 votes
1 answer
204 views

AllowMultipleValues in taxonomy field in CSOM Javascript

I am trying to create a taxonomy column within JSOM , I am nearly there but I have set the type to : var fieldSchema = `<Field Type="TaxonomyFieldTypeMulti" Name="...
Jason Hough's user avatar
1 vote
1 answer
151 views

Adding the metadata to a taxonomy column in JSOM

I am struggling getting taxonomy into a metadata column using JSOM. I cannot find any great learning manual for JSOM. var fieldSchema = `<Field Type="TaxonomyFieldTypeMulti" ...
Jason Hough's user avatar
0 votes
1 answer
35 views

How to add non list based OOTB web parts with JSOM Sharepoint 2013

I am attempting to add a Query String Filter Url Web Part to a page programmatically with JSOM and am hitting a dead end. I see how you can add a web part if you already have the XML like in this ...
Jonah Kornberg's user avatar
1 vote
1 answer
321 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 ...
Dylan Cristy's user avatar
  • 12.7k
0 votes
1 answer
469 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?
user88343's user avatar
0 votes
1 answer
861 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"; ...
user1234567890's user avatar
0 votes
1 answer
118 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 ...
user1234567890's user avatar
0 votes
2 answers
547 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?
Mavani's user avatar
  • 477
0 votes
1 answer
1k 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. ...
user18508's user avatar
0 votes
2 answers
608 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 ...
Harrish's user avatar
  • 113
0 votes
2 answers
261 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', ...
Imen Turki's user avatar
  • 2,183
0 votes
0 answers
235 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. ...
villefleurie's user avatar
0 votes
1 answer
39 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 ...
user1513177's user avatar
0 votes
1 answer
2k 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> <...
Rohit Waghela's user avatar
0 votes
0 answers
154 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) { ...
Harrish's user avatar
  • 113
1 vote
2 answers
2k 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 ...
Ushka's user avatar
  • 277
0 votes
1 answer
210 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 ...
Pablo's user avatar
  • 1
0 votes
1 answer
682 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 ...
Susan T.'s user avatar
  • 141
0 votes
2 answers
2k 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 ...
naijacoder's user avatar
  • 4,282
0 votes
1 answer
376 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 ...
SharePointNewbie's user avatar
1 vote
1 answer
60 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() {...
Chandani Prajapati's user avatar
1 vote
1 answer
250 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....
Y_Lakdime's user avatar
  • 113
0 votes
1 answer
1k 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 ...
Kailash Sahoo's user avatar
0 votes
2 answers
322 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
Kailash Sahoo's user avatar
0 votes
1 answer
698 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, ...
Kailash Sahoo's user avatar
1 vote
1 answer
393 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')/...
Triangle's user avatar
0 votes
1 answer
71 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); ...
Joseph Jojo John's user avatar
0 votes
2 answers
97 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 ...
entryton's user avatar
  • 332
0 votes
1 answer
235 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: ...
user85213's user avatar
1 vote
1 answer
1k 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')
spUser01's user avatar
0 votes
1 answer
369 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 ...
Surendra Mourya's user avatar
0 votes
1 answer
75 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 ...
Ed1995's user avatar
  • 459
0 votes
2 answers
843 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 ...
Steve Kessler's user avatar
1 vote
1 answer
177 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. ...
Sanjana V's user avatar
  • 301
0 votes
1 answer
372 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 ...
Dylan Cristy's user avatar
  • 12.7k
1 vote
1 answer
244 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 ...
Ed1995's user avatar
  • 459

1
2
3 4 5
18