Questions tagged [jsom]

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

You can use the SharePoint client object model JSOM(JavaScript Object Model) to retrieve, update, and manage data in SharePoint.

871 questions
3
votes
2 answers

Multiple File Upload SharePoint REST API : JSOM

Can someone suggest me a way to upload multiple files to SharePoint List item using JSOM? I can upload a single file to the list item. But i m unable to upload multiple files to list item at one time.
Selva
  • 51
  • 3
  • 9
3
votes
1 answer

JSOM Compare two Lists if items exists

I have the same list in two sites, one in Site1 and other in Site2. The list items are copied form site1 to site2 list and during this copy one column (RelationShipCol) has the same value as Site1 list to identify that row exists in both lists.…
user42012
  • 131
  • 1
2
votes
2 answers

Object array in field in JSOM

I want to store an object array in a SP field and then inject it into a standard statement for interrogation of its properties. I have a field named User that contains the following: firstName:"John", lastName:"Doe", age:46, bornIn:"Utica",…
Etswatch
  • 31
  • 5
1
vote
2 answers

SP.UI.ModalDialog.showWaitScreenWithNoClose is not closing

I had written the below code to get the information of SharePoint list , And also I had used SP.UI.ModalDialog . Unfortunately the dialog box is not getting closed. Can any one please help me what's wrong in my below code
MSA
  • 1,155
  • 3
  • 20
  • 48
1
vote
2 answers

JSOM to set or save null value to SharePoint Date and Time Column

I had Column "StartDate" with "Date and Time Format" DateOnly and "Display Format" Display. And I am using JSOM with OTB to save information to SharePoint list. When I use oListItem.set_item('StartDate',TempStartDateValue) I am getting…
MSA
  • 1,155
  • 3
  • 20
  • 48
1
vote
0 answers

JSOM get user's sharepoint groups by AD

I use JSOM to get Sharepoint group of my user like this and it's working perfectly : userGroups = currentUser.get_groups(); context.load(userGroups); var groupsEnumerator = userGroups.getEnumerator(); while (groupsEnumerator.moveNext()) { var…
1
vote
1 answer

How to get a parentweb(and query publishing pages) from a subsite

I'm trying to query http://rootsite/Pages from a subiste //var clientContext = new SP.ClientContext("/"); var clientContext = new SP.ClientContext(_spPageContextInfo.siteServerRelativeUrl); …
naijacoder
  • 4,272
  • 26
  • 101
  • 188
1
vote
0 answers

Handle error no no records match the query

I using JSOM. My CAML query does not match any records so no records are returned via the list.getItems(caml). Consequently the code that sets localstorage session values below fails while (enumerator.moveNext()) { var listItem =…
Etswatch
  • 31
  • 5
1
vote
0 answers

How to navigate between a root folder to a folder with a specific title with JSOM

I want to navigate into a folder in SharePoint and create there a File. I can already create a file on the "root" folder of a selected list. However I can't "switch" into a specific folder (document set) which is in the root folder. clientContext =…
Mr. Olomu
  • 123
  • 3
0
votes
1 answer

call executeQueryAsync mutliple times and add results into an array

I am trying to get the Files Urls from selected documents. I am using SPContext to make a call and then using a callback function to push results into an array then later in the code I loop through the array to access the urls so I can download the…
I-junior
  • 3
  • 2
0
votes
3 answers

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.webAbsoluteUrl; var clientContext = new…
iNeedTea
  • 1
  • 1
0
votes
1 answer

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 article that can help me to authenticate from an…
Pablo
  • 1
0
votes
2 answers

remove double Quotes while binding the data from SharePoint List Item to html textarea

I am binding the data for SharePoint list item as below . But after binding the data I am getting the result in double quotations. Can any one please help me in finding the issue in below lines var txtparticipateidvalue="txtparticipants"+count; var…
Ax Learner
  • 31
  • 3
0
votes
1 answer

Can we use SPSiteDataQuery in JSOM OUT OF BOX?

I would like to know weather we can use SPSiteDataQuery in JSOM or not. If yes request anyone to please guide me . we all knew that SpSiteDataQuery is Much faster when compared to SPQuery, And I am retrieving some large amount of list items
MSA
  • 1,155
  • 3
  • 20
  • 48
0
votes
2 answers

How to display SharePoint ShowWaitDialog till SharePoint list items get bind to html table

I am using below piece of line to execute the required function on-load. But I would also like to execute "ShowWaitDialog" and display the dialog until my html table get binds from SharePoint list SP.SOD.executeFunc('sp.js', 'SP.ClientContext',…
Ax Learner
  • 31
  • 3
1
2