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

learn more… | top users | synonyms

3
votes
1answer
29 views

Sharepoint Jsom return wrong time

I have custom column, interview date, in custom list and I am storing date and time in column. When I fetch interview date data then it will return wrong time. If I store value in field 26 May 2016 ...
0
votes
1answer
18 views

Getting the site collection url for 2007 to O365

I'm trying to figure out how to get the site collection url for any version of SharePoint, not sure which method would be the best I figure using window.location probably isn't reliable, ...
4
votes
2answers
719 views

Using jQuery $(document).ready() in JavaScript Object Model

I've been using with great success the $(document).ready(function() { FunctionName(); }); in a SharePoint WebPart code snippet to fire off COSM CAML queries using JavaScript to build various ...
0
votes
1answer
18 views

Set the SiteUrlLogo using JSOM in SharePoint 2013

Is there a way we can set the SiteUrlLogo using JSOM in custom Master Page using visual studio?
1
vote
1answer
27 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
18 views

How to Create New Field with Specific different Internal Name and Display name in SharePoint 2013 Client Object Model

When creating a new field using Fields.AddFieldsAsXml, I used below code : <Field Type='Text' DisplayName='Employee Number' Name='EmpNumber' /> But the Internal Name of the created field. ...
1
vote
3answers
52 views

Errors when reading a lookup field of a list item using the JavaScript Object Model

I changed a field from being a single line of text, to being a lookup (still only displaying a single line of text, but it's fetched from another list. The field's internal name is Status. This is ...
0
votes
2answers
30 views

Get the Termset with Javascript and nothing return

We are working on a SharePoint 2013 on-premise farm. I am trying to return the termset object with ID 'xxxxx-xxxxx-xxxxx-xxxxx-xxxxx'. Here is my script. I add a content editor webpart and insert ...
0
votes
2answers
17 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
0answers
69 views

MountPoint security error: NoScript isn't enabled on the host site

I'm trying to call the following JSOM code from a JavaScript file uploaded into a document library in SharePoint Online (the code is called from an anchor tag in a custom search display template): ...
0
votes
1answer
33 views

deleteObject undefined error

I'm getting this error when i'm trying to execute delete code SCRIPT5007: Unable to get property 'deleteObject' of undefined or null reference Here is my code...Not sure what is going wrong ...
0
votes
1answer
16 views

SharePoint 2010: Add GroupBy to existing list view using JSOM?

Is it possible to modify an existing view, more specific adding GroupBy, using JavaScript / JSOM? I am creating the library using JavaScript and I'd like to add a GroupBy in the "all items" default ...
0
votes
1answer
26 views

Concatenating 2 columns with TimeStamp in JavaScript Add Method

I have a Save button and when user clicks it, I want a new value of concatenation of 2 columns with time stamp. Below is the image of the list. I want the Recipient column to be loaded with ...
0
votes
1answer
11 views

Download documents in a zip from a page using in SharePoint online

I have created a product page in SharePoint Online Pages Library. It has some standard field, e-g Title and Comments. It also has a Content Query WebPart that displays a list of linked files stored in ...
0
votes
2answers
33 views

CSOM or JSOM or REST for new SPS developers

I want to get in to SPS development space and currently I`m more of a person who uses OOTB and aware of SharePoint Administration side. Therefore would like which is the Programming model that I ...
1
vote
1answer
39 views

SharePoint JSOM and Promises - copying items from one list to another

I need to use JSOM to copy a set of items (found from a CAML query) from one SharePoint list to another. I'm pretty experienced doing this type of thing on the server side, but relatively new with it ...
0
votes
1answer
62 views

Javascript csom to get lookup/person or group value

I am trying to get values of few lookup columns and person or group column of my list using the below code var context = SP.ClientContext.get_current(); var web=context.get_web(); var ...
0
votes
1answer
34 views

Can SharePoint Future run JSOM?

I have seen SharePoint Future video, but now have the questions and I read blog by MVP Waldek https://blog.mastykarz.nl/learn-sharepoint-framework/ He says JavaScript is harmful language and I must ...
0
votes
2answers
19 views

Use default edit form inplace of default display form

We have some scenarios where it would be more reasonable for us to only use edit forms. For example when you click a link on a lookup column, I would like to get redirected to the edit form, and not ...
1
vote
2answers
29 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 ...
-1
votes
2answers
49 views

executeQueryAsync function calling not working using for loop

I am having values in result[15452,33616] when using for loop ,the async function taking only last array value (e.g-33616) and fetching the data for that pushing to another array and final push into ...
0
votes
1answer
31 views

Get default value for Managed metadata column

How can I get the default value of a Managed metadata column. I'm trying to do: var ctx = new SP.ClientContext(url); web = ctx.get_web(); lists = web.get_lists(); ...
1
vote
0answers
17 views

Which http headers are stripped out by the Sharepoint Web Proxy in SP Online?

I've used the Azure API management gateway to intercept traffic from the SP web proxy and I've learned the following about its behavior with HTTP headers: Custom headers are passed through ...
0
votes
1answer
23 views

How to use asp.net controls in .JS file for SharePoint Development

I am working on JS file from SharePoint designer and using HTML controls inside my JS. I am willing to replace HTML Controls with asp.net controls for the user interaction. Can any one help me in ...
1
vote
1answer
18 views

Unable to remove title field from list definition

I am working with a list integrated into my SharePoint Add-in. Normally, to remove the title column, I would go into the list settings menu and work with the column that way. The issue is that from ...
1
vote
1answer
36 views

Folder Name inside document library in sharepoint hosted app

I am making app that display document library in nested list means if there is folder and it contain files then it displayed in nested files list. Here is my code to get folders name inside document ...
0
votes
0answers
24 views

check group permission with javascript

I am developing a sharepoint add-in for Office 365 and I need to check groups permissions for my site. Has anyone some ideas?
2
votes
2answers
32 views

Value does not fall within specified range error when adding folder - JSOM

I am attempting to use JSOM to add a folder to a pre-created folder within a specified library. In the code below, I have checked that all of the variables are functioning as expected - meaning the ...
0
votes
1answer
64 views

web.getList() retrives all lists. Instead of this I want only user created list

I am making Sharepoint hosted app and I am trying to get all lists appContextSite = new SP.AppContextSite(context, hostweburl); this.web = appContextSite.get_web(); //Code to get the cross domain ...
1
vote
1answer
40 views

ctx object in document sets

I need to get to the ctx object when a user navigates to a document set. My code runs well on all other pages so far, but on document sets it seems random if the ctx is loaded or not. I was told in ...
0
votes
2answers
59 views

move list element to another list with Jquery

I have two lists and I would like to move a list item to another list on a webpart button click. Is there a way to move items using jquery in sharepoint? Thanks.
0
votes
0answers
19 views

Start a workflow task and assign it with JSOM

I am trying to see if it would be possible to start an Approval or Collect Feedback workflow with JSOM. There is some documentation out there for kicking off a workflow with JSOM: ...
0
votes
1answer
24 views

Get the month name using html date control

I am using HTML controls to get interact with SharePoint 2013 list And performing CRUD operations using JSOM between forms and lists My form is having HTML date control.And on the submission of it, ...
2
votes
3answers
376 views

REST 403 Response on Chrome/Firefox/Edge but not IE

I have created a SharePoint Add-In that attempts to list out the subsites of the current site using the REST api. Here is the code snippet: //Subsites function searchSubSites(webUrl, success, ...
0
votes
0answers
16 views

How to set equivalent of “No New Instances” on Worflow in JSOM/CSOM code on Sharepoint Online?

We have created a SharePoint 2013 (SP Online/Office 365) hosted add-in which allows admins to set various column values on all items on a document library, or recursively from a provided folder. ...
1
vote
2answers
40 views

Remove Cancel button of New Item form from SP Modal Dialog

Using below code I am loading share point new list item form in the SP Modal Dialog. Now I want to hide Cancel button of that form. How can I do that ? <script type="text/javascript"> var ...
0
votes
1answer
23 views

Using 'ExecuteOrDelayUntilScriptLoaded' on Client Web Part page

Can anyone tell me how I can use: ExecuteOrDelayUntilScriptLoaded(myFunction, "sp.js"); in my Client Web Part pages (App Parts)? In my standard pages it loads fine but when I try use this ...
0
votes
0answers
23 views

Retrieve list item created by current user in content editor in SharePoint 2013 [duplicate]

I want to show SPModal Dialog which contains a new item creation form to the user on the page intranet home page if user is not create or submit any items in that list. I tried but I am getting error ...
1
vote
2answers
48 views

Add Run with elevated privileges in JSOM [duplicate]

I writing JSOM code to get interact with sharepoint 2013 lists and document libraries.Now I have requirement to allow anonymous users to insert the items for SharePoint Lists list. Can any one help ...
0
votes
1answer
19 views

Object Object error on JSOM Insertion Operation

I had written the code to insert the values in sharepoint list,And I was unable to to perform the operation.When I check step by step using "alert" then I see error as "[Object Object]" . Below ...
1
vote
2answers
64 views

JSOM to load pop with new item form if user is not created previously

I want to create one SP dialogue box at home page which load the new item form of list or survey if current login user is not created any item previously. Is there any way to do that ? I tried using ...
0
votes
1answer
16 views

REST API return encoded Multiline Textfield but show it correctly

I save a JSON string in my SharePoint list. This looks like: ...
2
votes
1answer
42 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
1answer
32 views

Is there a built in SharePoint object which lets you know if you are in a form?

I'm in the process of branding a SP-tenant using JS-injection and CSS. I've been able to use ctx and _spPageContextInfo in many cases, but in some cases they aren't initialized. What is the best way ...
1
vote
1answer
62 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. ...
0
votes
1answer
88 views

Export Html table into Excel

I have written the code in .JS file to fetch the data from sharepoint list and display in html table. Now to take my work for next level I need to export the html table to "Excel". The below code is ...
1
vote
2answers
62 views

Hide a specific list from 'View All Site Content' using JSOM/CSOM?

I see you can make a list hidden by using SharePoint Designer (http://www.sharepointdiary.com/2013/06/how-to-hide-list-or-library-in-sharepoint.html) which I am not interested in. It is okay if the ...
-1
votes
1answer
41 views

Get folders and files from SharePoint List

I am working on an Provider hosted app, scenario is to get all folders and files from SharePoint library and display on UI(more like a view). Need some tips to do it. I mean how to create a UI similar ...
1
vote
0answers
38 views

ExecuteQueryAsync() caues error - The operation has timed out

I have an application in JSOM which updates property of document set in SharePoint online. I am updating 6 taxonomy fields, 3 text fields, 1 user field. I am also assigning permissions to a user. I am ...
3
votes
1answer
44 views

How to add Previous/Next buttons to SharePoint blogs posts?

How to add Previous/Next buttons to SharePoint blogs posts so I can navigate to previous or next post ?