Questions tagged [jsom]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
21 views

JSOM: get_isSiteAdmin () is not distinguishing between users and administrator of site collection

if (user.get_isSiteAdmin()) { document.cookie = "licence=yes"; } I am using user.get_isSiteAdmin() but its always giving value false I can not give "...
0
votes
1answer
13 views

Cannot set properties of default fields on SP.Folder item with JS

I'm working on code to create and set properties of folders in SP 2013 with JSOM. My current setup involves the following: var ctx = new SP.ClientContext.get_current(); var list = ctx.get_web()....
1
vote
2answers
42 views

CAML Query not display in Sharepoint2013

My end goal is to display items from SharePoint 2013 list that is more than 60 days from today and status is in process. This is my first time using CAML Query in JavaScript. I am not able to have the ...
1
vote
1answer
16 views

Why does the SP.SOD.executeFunc function not work properly?

I use this code to compare two dates, the date of today and the date in the list item. On the screen the dates look fine but when I check them in the debugger the dates are way off. Some are even one ...
0
votes
1answer
23 views

Can a user who is not a SharePoint Online administrator create a site collection with a template other than communication site or team site?

I have a user who I do not want to promote to a SharePoint Administrator, but I do want to allow them (because they are a developer) to create site collections with the template DEV#0 without having ...
0
votes
1answer
15 views

Provider Hosted App-Not able to get data from list using JSOM or Javascript in sharepoint 2016 On-Premise

My Provider-Hosted App published and hosted on IIS with https. The URL is like: https://localhost:44343/Pages/Default.aspx?SPHostUrl=http%3A%2F%2Fecontent&0319c41%2Eecontent%2Eelibrary%2Eapps%...
2
votes
2answers
192 views

Uncaught TypeError: Cannot read property 'apply' of undefined at Array.<anonymous>

I want to retrieve all the lists title of my SharePoint site and add in them into a list. But the error "Uncaught TypeError: Cannot read property 'apply' of undefined at Array." appeared in ...
0
votes
0answers
16 views

How to import and export document-set in JavaScript to move/copy it in different libraries

I am trying to use export and import document set using JavaScript (JSOM) to move/copy it between libraries. I am using reference to "SP.DocumentManagement.js". I am stuck with not being ...
0
votes
1answer
27 views

SharePoint 2013 JavaScript tag cloud throws site error

I am deploying the script below on a SharePoint site via content editor web-part. The script works fine but it leads to the site not functioning properly and the browser console throws the following ...
0
votes
2answers
90 views

REST API to get all site collections in sharepoint tenant [duplicate]

Can we use REST API to get all site collections in sharepoint tenant.? I don't want powershell script basically i want to bind all asite collections to a dropdown. my code looks like bleow.
0
votes
1answer
23 views

SPFx WebPart - SP.Runtime.js evaluation takes a long time

I have an existing JSOM web-part which reference the SPO runtime: , "sp-runtime": { "path": "https://abc/_layouts/15/SP.Runtime.js", "globalName": "SP", "globalDependencies": [ ...
0
votes
2answers
24 views

SPFX JSOM - call a named function from executeQueryAsync

Apologies in advance for the newbie question as I believe this is actually a fairly simple issue. I am using JSOM and in my WebBart.ts file have a named function that queries a list and produces front-...
0
votes
1answer
20 views

Change one SharePoint site link in the Global Navigation redirect to another site for all users except one

For example, a site in the global navigation, when clicked should redirect to another site for all users except one. Also, users who have saved the site as bookmarks should be redirected too when they ...
1
vote
2answers
21 views

Unable to save all users into SharePoint list

I am creating a list item using the code below: var context = new SP.ClientContext.get_current(); var dfd = $.Deferred(); var targetList = context.get_web().get_lists().getByTitle(listName); ...
0
votes
1answer
37 views

Can I use Modern Script Editor and JSOM to get items from a list?

In SharePoint Online is it possible to get info from lists and users by adding Modern Script Editor Web Part to a page and writing javascript code? I've found a few examples but none of them have ...
0
votes
2answers
23 views

Retrieve user info from azureAD profile

Could anyone suggest some way to retrieve user info from AzureAD using JSOM or REST API only..
1
vote
1answer
26 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&...
1
vote
2answers
33 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 ...
0
votes
2answers
27 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 ...
1
vote
1answer
18 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 ...
0
votes
0answers
9 views

SharePoint 2010 - Is FullTextSqlQuery or similar functionality available in JSOM

It's just a small question and I already googled it, but actually I cannot find any answer to my question. So does anybody know, if there is a similar functionality available for JSOM as it is in CSOM ...
0
votes
1answer
39 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....
0
votes
0answers
14 views

Crud operation on Excel File present in SharePoint document Library in sharepoint

Is there any way to fetch the excel file from SharePoint document library and update the data to respective cell in excel file and download the updated excel file in SharePoint 2013 using JSOM or Rest ...
0
votes
0answers
13 views

Display a specific list view using JSOM

Below is the code that I've currently got. I can not figure out how to add in the list view properly. I've added in var views = list.get_views("view name"); but every time I do, I get a blank page. ...
0
votes
1answer
23 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 - ...
0
votes
0answers
8 views

Timing of term/ taxonomy calls (smh!)

We are using client side javascript to get navigation terms from the term store and their manage navigation friendly urls as well as some custom properties for how the navigation behaves. This is the ...
0
votes
1answer
24 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 ...
0
votes
1answer
39 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) { ...
0
votes
3answers
26 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....
0
votes
0answers
30 views

Connecting web parts through Javascript in SharePoint 2013

I am working in SharePoint 2013, and I have two OOTB web parts (list view & URL filter) that I want to connect programmatically. I also want this to be a client-side solution with JavaScript, ...
1
vote
1answer
24 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?
1
vote
1answer
42 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 ...
0
votes
0answers
27 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.
0
votes
2answers
42 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.
0
votes
0answers
25 views

Configure Connections of Query String URL Filter web part programmatically

I am trying to configure the connections of the query string url filter web part with JSOM. The connections do not seem to be stored in the web part's properties, so I am at a loss as for how I can ...
0
votes
1answer
39 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="...
1
vote
1answer
26 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" ...
0
votes
1answer
33 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 ...
1
vote
1answer
74 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
117 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
70 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
34 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
66 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
207 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
20 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
94 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
48 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
42 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
35 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 ...

1
2 3 4 5
17