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
0answers
15 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
32 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
33 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
55 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
21 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
117 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
29 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
25 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(); ...
0
votes
1answer
10 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
17 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
49 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
75 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
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
25 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
54 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
40 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
28 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
34 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
170 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
19 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
28 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
32 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 ...
1
vote
1answer
196 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
33 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
61 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
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 ...
0
votes
1answer
89 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
44 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
25 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
26 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
69 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 ...
1
vote
0answers
19 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 ...
3
votes
3answers
98 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
22 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?
2
votes
2answers
47 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
46 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
39 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 ...
0
votes
0answers
55 views

Display Template and Item Template not showing in Content Search Web Part

I am facing a weird issue. When I'm uploading custom Display Template JS file and custom Item Template JS file using an Add-In, for some reason it is not showing in the webpart properties. But when I ...
0
votes
2answers
50 views

Which permissions does my SharePoint Add-in need to get Site Collections?

I am building a Provider-Hosted SharePoint Add-in. Given a SharePoint Online tenant (account) where my add-in is installed, I want to get a list of their Site Collections To get this done I am ...
0
votes
0answers
18 views

How to get current master page from app page using CSOM

I am trying to get the current master page from the app page using CSOM. With the below code i am able to get the master page details from the following piece of code: var context = new ...
0
votes
2answers
57 views

How to get current master page using CSOM

I am trying to get the current masterpage using CSOM. Here is the code which i tried: var context = new SP.ClientContext.get_current(); var web = context.get_web(); var ...
0
votes
1answer
49 views

How to obtain an App-Only Access Token to use with CSOM for SharePoint Online?

I have a multi-tenant Azure AD web application set up. This represents a scheduled task that needs to get a list of Site Collections from each one of (the web app's) SharePoint Online Tenants. I am ...
0
votes
0answers
65 views

GetFolderByServerRelativeUrl Returns a folder from another web (CSOM)

I have a simple web structure: Site collection: var siteUrl = "http://hub-site/sites/home" Sub Site : var folderUrl = "http://hub-site/sites/home/subhome1" In subhome1 i have a document ...
0
votes
0answers
36 views

How to connect Office Add-In to SharePoint On Premise

I am trying to develop a Word Add-In and I need to retrieve a SharePoint list items. 1st Question: It is posible to write CSOM (c#) code instead Javascript? 2nd Question: How can connect to a ...
1
vote
1answer
33 views

How to handle currency values correctly in CSOM?

I have a currency field inside a SharePoint List. When I retrieve that field the result type is "double". As it should be according to the documentation. But we all learned that double is a bad ...
0
votes
1answer
28 views

Downloading file fails on the second download

I have the following code using CSOM to download a file from a sharepoint site: public IEnumerable<FileUpload> DownloadFiles(string client, Guid userGuid, IEnumerable<Guid> ...
0
votes
0answers
27 views

Copying more that 3000 items from custom one list to another by making use of jQuery SP Services in SharePoint 2013

I have a requirement to copy more that 3000 records from one custom list to another by making use of CSOM/jQuery SP Services in SharePoint 2013. My custom list contains around 160 columns. I have did ...
1
vote
0answers
22 views

.saveWebPartChanges() always re-enables 'Display search box' to checked

When I set JSLinks on WeParts with code: jsl.ctx.load(properties); properties.set_item('JSLink', JSLink); webpartDef.saveWebPartChanges(); It also resets the previously unchecked Display ...
1
vote
2answers
70 views

CSOM - find if content of library has changed

I would like to check within client application (CSOM), if there have been any changes to any files in library in eg. last 15 minutes. I know that there is list.GetChanges method in server-side ...