The client-side object model (CSOM) provides access to a subset of the SharePoint Foundation server object model, including core objects such as site collections, sites, lists, and list items and allows you to program against these from client side applications.

learn more… | top users | synonyms (1)

1
vote
3answers
66 views

CSOM error with SP.SOD.executeFunc used twice

I'm trying to do several CSOM requests. But I can't do it. Here is my first, that works alone : var collListItemToBeUpdatedRevente = ""; var enumeratorRevente; var ...
3
votes
1answer
42 views

Updating a UserCustomAction ScriptSrc

I'm trying to update a UserCustomAction that is set on a web. I am trying to update the ScriptSrc url of the action to include a query string parameter, ?rev=1, but it does not seem to be taking. ...
1
vote
1answer
101 views

Keep the same ID on an item copied from another list

Environment : Foundation 2010 I have two helpdesk lists. In List A, the user create the item and an ID is automatically assigned. My workflow is used to copy that item in the list B. However IDs are ...
0
votes
1answer
72 views

SP.ArrayListEnumerator check if length = 0

I have one object in my code that is of type SP.ArrayListEnumerator, and I want to check if its length is 0 or not. How do I do that using JavaScript?
0
votes
1answer
21 views

Hosting a SharePoint Page in a minimalist manner

I have a simple SharePoint CSOM page that is used to pull the Current user and their Email. I'm hosting this page in a dedicated Site Collection which seems like overkill. It's essentially a redirect ...
0
votes
0answers
59 views

programmatically disable Offline Client Availability

I'm making a provider hosted add-in for SharePoint Online that will create sub-sites for a customers different projects. The customer don't want the offline sync to be activated and in a perfect ...
0
votes
1answer
25 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
165 views

Loading list items with CSOM ClientContext.Load: performance with LINQ

We have code like this: List list = clientContext.Web.Lists.GetByTitle("TestLib"); ListItemCollection items = list.GetItems(query); clientContext.Load(items, its => its....
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
1answer
49 views

How to debug the sharepoint web proxy

I am using the sharepoint web proxy to call the AAD token endpoint web service in Azure. When I do the call, the response calls my error callback with a jqXHR object that contains the following: { ...
0
votes
1answer
74 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
33 views

Returning a SharePoint 2013 termset in a tree structure using CSOM

Is there's a way to Return a SharePoint 2013 termset in a tree structure using CSOM ?
1
vote
0answers
26 views

Adding ListItem via CSOM trigger both Create and Update Workflows

I'm using CSOM to create listitems in a custom list on SharePoint 2013. On the list I have 2 workflows, one that executes on item create and one that executes on item change. Or "Start workflow ...
0
votes
1answer
42 views

Attaching a file to a list item using CSOM

I'm attempting to use a console application to attach a file to a list item I have created in code. Here's what I have: var attachmentInfo = new AttachmentCreationInformation(); // ...
1
vote
1answer
49 views

CSOM - Check if one root site collection

I have a situation in which I'd like to know whether the user is currently on their root site collection or not. I tried the following: var siteRelativeUrl = ctx.Web.ServerRelativeUrl; var isRoot = ...
1
vote
2answers
68 views

Select 5 items with caml beginning at the fifth row

I can get the 5 first items of a list with caml : var collListItemToBeUpdated = ""; var listItemToBeUpdated = ""; var enumerator; function getItemsToBeUpdated2() //this function ...
0
votes
1answer
37 views

How do I get the ParentItemID? (C# Csom)

I've a problem about the ParentItemID in the discussion board. I try to get it in order to do a hierarchy between the responses of a subject. I just access the title and the body of the response, and ...
3
votes
1answer
454 views

Send Emails via SharePoint CSOM

I am trying to write a mailsender in C# for SharePoint but each time I start it I get this error message that tells me that it doesn't have permission. I had tried to give it permission at ...
0
votes
0answers
44 views

Getting “Cannot complete this action. Please try again”

Folks: I have created an console application to upload data from a Excel spreadsheet into an custom SharePoint. Everything works perfectly until I try to save the new list item. ...
-1
votes
1answer
43 views

Read Term store in SP 2013 and build custom tree

I try to read Term store and build custom tree structure using CSOM in sharepoint 2013. i can able to get the terms from term set var terms = termSet.GetAllTerms(); clientContext.Load(...
0
votes
1answer
24 views

Dynamically build url to documentset homepage

I have some methods using CSOM that are being called form an external program. In one of these methods I check if a document set exists on a certain location, and if it does I want to return the url ...
0
votes
0answers
21 views

SharePoint CSOM Change group permissions

I need to build a simple application that will take an item in the list and change permissions on the existing groups from "contribute" to "read". I was able to do this for users, but I am struggling ...
0
votes
1answer
54 views

SharePoint Online list view threshold

I need to access a list with 40,000 items and populate that data into a csv. How can I do this using caml?
1
vote
1answer
176 views

CAML query format filter in DateTime column

I need to get the list item created on a particular date. The below caml query doesn't seem to work. It always retuns 0 query.ViewXml = @"<View><Query><Where><Eq><FieldRef ...
1
vote
2answers
122 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
26 views

Navigation nodes - Same code gives different results

I am recreating the left navigation bar with code in vb.Net. The code runs fine in my test environment and produces the desired results, but in production it does only almost perfect job. The last ...
0
votes
0answers
112 views

Remove User from a Site through CSOM

I have a CSOM Script (Below) that I am using to delete a user from a SharePoint Group. But in some of the site the users are added directly to the site. Can you please let me know, how I can remove ...
0
votes
1answer
58 views

Add Sharepoint Group as Group Owner

I am trying to add a SharePoint Group as a Group Owner to another SharePoint Group using CSOM but unfortunately I am not successful. Please find my script below. Can someone please suggest where I ...
0
votes
1answer
36 views

Jquery to display formatted value in content editor

I'm completely new to jquery and by now I'm not able to use it. Can anyone help to write a piece of code, which will display single item (given ID) from the list 'CounterList', column 'Counter' to a ...
0
votes
1answer
39 views

Sharepoint 2013 Client Side Rich Text Editor saving troubles

I'm trying to get a rich text field from the DOM and save it via javascript and its Sharepoint Client Context.I have an XSL form that creates a Sharepoint Form Field with a structure that's something ...
3
votes
2answers
350 views

CSOM - Get root site collection URL

I'm trying to evaluate the position of users, defining whether they come from a site (test.sharepoint.com/sites/site1) or if they reside at the root site collection (test.sharepoint.com). Does CSOM ...
0
votes
0answers
26 views

Sharepoint-Hosted Add-in: Intercept save button on Project Details Page. (PWA 2013)

I'm trying to create a Client web Part (Sharepoint-hosted Add-in) and its objective is to be a kind of project details page. I want to do this because, I need store some data from a external system ...
1
vote
1answer
36 views

Get Video Source from variable

I am currently using SharePoint to query a pages library for a video, the aim is to then display this video in an iframe, I am currently using csom to get the video source from a Page, however this ...
0
votes
1answer
44 views

Using CSOM in SharePoint Online Hosted App

I've recently been playing with apps in SharePoint Online. I've wrote a few basic CRUD apps that use JSOM and the REST APIs. These approaches are relatively well documented online, so finding material/...
1
vote
1answer
212 views

Create ListView with InplaceSearch on TeamSite from XML

TL;DR Version Cant create a webpart with searchbox (InplaceSearchEnabled) from XML and even cant modify it afterwards via SSOM to make it work. Setting the value over the UI works fine. Problem ...
0
votes
1answer
50 views

SharePoint provider-hosted app filter document library CSOM

I have the following code that gets files from a document library. Works great for getting all the files. Now, however, I want to filter the files using the "title" param before passing it back to my ...
1
vote
1answer
87 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. ...
1
vote
2answers
83 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 ...
0
votes
1answer
198 views

Get person or group field from list then query user profile

I am currently working on SharePoint 2013 on premise and I am trying to use JavaScript to get the latest 3 "new starters" from a SharePoint list then return information about them such as the ...
1
vote
2answers
48 views

Moving to client site development in SharePoint 2013

I am new to SP as a developer but experienced as SharePoint users. I am moving to SP development side ( I have depth .NET programming knowledge). As a first assignment I am in need to convert a ...
0
votes
0answers
27 views

Get Document Views from Client Side

We have a SharePoint 2013 intranet site that contains a Document List. There are .xlsx documents and .rdl documents. I want to know which users viewed which documents. I want to get this information ...
1
vote
0answers
44 views

Applying SharePoint theme using CSOM - The request uses too many resources

I have an Azure web job that provisions SharePoint Online sites and during the process it applies an out of the box SharePoint theme. The theme is determined by the process, but can be "Orange" or "...
1
vote
2answers
107 views

Fix 401 Unauthorized Exception uploading file to SharePoint 2010

I have a WCF service hosted in IIS on Domain 1. This service is accepting a request to upload a file, and then uploading the file to a SharePoint 2010 Server on Domain 2, using the client object model....
1
vote
0answers
23 views

2013 CSOM development-accessing List directly as user doesn't have permission to access teamsite

I want to perform CRUD to a list from a console app or Asp .NET website. I am granted access to the list, but not the team site: accessing this https://mycompany.sharepoint.com/teams/teamname/a/b/...
3
votes
3answers
185 views

SharePoint DateTime issue when date is saved using CSOM

The timezone set in SharePoint Online is EST and when it is being saved to SharePoint using CSOM/ECMA script from location with UTC +5:30 timezone the date is reduced. Everytime we edit the time is ...
0
votes
0answers
7 views

Setting priority for Selects/Inserts?

I have an Azure Webjob, that runs some code once in an hour. It reads Data from a SharePoint-List, modifies it and updates the item afterwards. While these operations only happen once in an hour they ...
0
votes
0answers
34 views

Get HttpContext from ClientContext?

I have a ClientContext from a valid connection (AppOnly-Permission). Is there a way to get the HttpContext from that?
4
votes
2answers
78 views

Disabling tabular view

I have a bunch of views to create for a couple libraries that are all basically the same except for some filter values. I can create them in PowerShell using ViewCreationInformation. After a bit of ...
1
vote
0answers
100 views

How to upload document file and its version file using csom in C#

I have downloaded a document file (current version) and its version history files (old version files) from one of my sharepoint site list. Now, I want to upload that current version file into another ...
0
votes
0answers
47 views

Uploading multiple files to document library is not working correctly

I'm developing a web-part (a form basically) for Office 365 / SharePoint Online. This form contains a file upload for allows the user select multiple files. The problem that I'm facing right now is ...