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

0
votes
1answer
10 views

JSOM Script Returning serverRelativeUrlOrFullUrl Error from SP.ClientContext.get_current()

I'm attempting to build a script for a Sharepoint 2013 project management hub that eases the process of spinning up and archiving project subsites as they are needed. I'm having trouble getting my ...
0
votes
0answers
7 views

Is there any other way to create a list template programmatically Other than by using Server object?

Server Object is having a function SaveAsTemplate() to create list templates. By any other means can we create the list template other than server object ?
1
vote
1answer
31 views

SP.ContentType.get_parent(), how to get name?

The code below works only to get SharePoint 2013 Foundation list content type and content type url, but I cant get the parent content type. It returns an object but when I try to access properties ...
0
votes
0answers
24 views

jquery datatabes deferloading is throwing an error

I am using SharePoint Search API to search SharePoint lists and using jquery datatables to display the data. In my code I have set the row limit to 100. So getting the first 100 items/results is fine ...
0
votes
2answers
45 views

How to query more than 100 rows with CSOM?

I have a WPF application I've built that relies on data within a SharePoint list (synced from a website). I believe, perhaps incorrectly that this query will be limited to retrieving 100 rows at a ...
3
votes
1answer
108 views

Recovering a file from the recycle bin

I'm working on a general function to recover an item programatically from a recycle bin via Powershell and CSOM. This is what I have so far, it doesn't throw an error, but it doesn't recover the file ...
0
votes
1answer
17 views

CSOM Search takes more time to load than Content Search web part

I am using the code below to retrieve data from different lists, but I see that it is slower than Content Search Web part. The returned rows are the same 28 in total, but it takes more time csom to ...
0
votes
0answers
19 views

how to show all search results using jquery Datatable?

I am searching lists using CSOM Search API and displaying the results using jquery DataTable. My problem at the moment is that my search returns 2134 rows in total, but search api has a limit of 500 ...
0
votes
0answers
15 views

CSOM issue: workaround needed for SystemUpdate & DisableFiringEvents to be able to save current Version to a textfield

To be able to include the current version in Word, I need to have a custom Text field that contains the current version (calculated & Version fields are not available in QuickParts). * The new ...
0
votes
0answers
11 views

How to set taxonomy user profile property via CSOM?

Is there a way to set/update a typed taxonomy user profile property via CSOM? Using the server OM I can use the ProfileValueCollectionBase.AddTaxonomyTerm method, via CSOM it seems that I can only ...
0
votes
1answer
24 views

CSOM Search Api error: Unable to get property 'ResultRows' of undefined or null reference

The code below is working fine in my dev machine but the moment I tried to test it on our customer's server, I started getting errors. I started having errors with SP.js. So I used the <script ...
1
vote
1answer
28 views

Querying share point online Search via CSOM in provider hosted app using App only Access Token

The Scenario I am developing a Sharepoint provider hosted app. the Sharepoint app web is only used as a repository for storing documents in document libraries and The web application use O365 ...
1
vote
2answers
27 views

PowerShell CSOM set web inheritance

Piggy backing off my last question, Modifying Global Navigation Settings in SharePoint Online, is it possible to set a subsites navigation inheritance to use the same as the parent? If it is possible ...
0
votes
1answer
17 views

How to display Search API results like SharePoint OOTB list with filtering, sorting, paging

I would like to display Search API results like OOTB Sharepoint list with filtering at least. Is it possible to use SharePoint javascript libraries to achieve this? If not, is there any ...
1
vote
1answer
26 views

Display CSOM search results like OOTB list with filtering and sorting

I would like to display Search API results like OOTB Sharepoint list with filtering at least. Is it possible to use SharePoint javascript libraries to achieve this? If not, is there any ...
4
votes
1answer
66 views

CSOM Search API does not return all the results

I am having a problem with the code below. It is not returning all the rows/items which are found in different lists. The total number of items is 28, but the code below is returning 19. I have set ...
1
vote
1answer
25 views

Using csom search api, how can I search lists based on content types?

I have multiple subsites and each subsite has a list called "Articles". Each has two content types. "News Articles" and "Success Stories". I would like to search based on the content types above using ...
0
votes
0answers
22 views

CSOM Querying a second list based on ID from an array

I have created an Array loading list data in, then displaying the array using knockout data-bind in a table. The issue is I have a second list that is related to the first list that I also need to ...
1
vote
0answers
38 views

Sharepoint Online CSOM Powershell - Remove Permission level for a Group in a list

I have a list in which I want to remove "Contribute" Permission Level for a particular group "List Members Group". After removing this, I want to add "Read" Permission level. Basically, I want the ...
2
votes
1answer
62 views

How a CSOM or JSOM code gets permission to do Add/Edit/Update operation on list?

While RunWithElevatedPrivileges is applicable in Server side code how a CSOM or JSOM code gets permission to do Add/Edit/Update operation on list?
0
votes
1answer
16 views

How do I retrieve available languages for creating a site using CSOM

When creating a new SharPoint Online web using CSOM .Net, I have to provide a valid LCID for Language property in WebCreationInformation object (when not using default). Is there a way of retrieving a ...
0
votes
0answers
23 views

Get all discussion board discussions and replies with JSOM

How can I display all discussions in a discussion board with the replies displayed beneath each discussion with JSOM? Getting the discussions or the replies for a specific discussion is easy but I ...
1
vote
1answer
68 views

CSOM CamlQuery is returning data I don't believe it should

I have the following code to retrieve orders from an order list that have a status of Approved: private static ListItemCollection LoadListItemCollection() { using (var ctx = new ...
0
votes
0answers
20 views

How to create custom user profile properties using javascript?

Is there any way to create an user profile property using the sharepoint online javascript api? if not which is the correct way to provision custom user profile properties for an app Thanks
0
votes
0answers
18 views

Using CSOM to Start a SharePoint 2010 Workflow with an Assignment Stage Parameter

So I find myself needing to start a SharePoint 2010 Site workflow on a SharePoint Online site. Since this workflow starts a custom task process, it's been created with an Assignment Stage parameter to ...
3
votes
1answer
32 views

'Microsoft.Web' is a 'namespace' but is used like a 'type' in CSOM sharepoint

I am new to CSOM and below is my first console application. the web is not recognising. Though all the dll in 15 hive are verified. Please help using System; using Microsoft.SharePoint; using ...
0
votes
0answers
22 views

Version count not showing what it should do

$Upload = $DestinationFolder.Files.Add($FileCreationInfo) $Context.Load($Upload) $Context.ExecuteQuery() Write-host "Adding the meta data to the document in O365" $ListItem = ...
0
votes
0answers
22 views

Set Associated Content Type fields for a List Item

My goal is to set a list item's Content Type to "Page Layout" and under "Associated Content Type" settings, Set "Content Type Group" to "Page Layout Content Types" and "Content Type Name" to "Article ...
0
votes
1answer
27 views

Copy SharePoint file from Http to Ftp

Is there a direct way to copy a file from a SharePoint library to an Ftp location? Currently, I'm able to download the document to a local directory using the OpenBinaryDirect method, however this ...
0
votes
0answers
17 views

Copying large quantities of Documents from Provider Hosted App causing Time Out

I'm copying documents from one library to another using the Server Side CSOM from an Azure Hosted Web App. ListItemCollection items = src.GetItems(CamlQuery.CreateAllItemsQuery()); ...
0
votes
0answers
20 views

Uncaught TypeError: Cannot read property 'WorkflowServicesManager' of undefined from CSOM

SharePoint Online 2013. Trying to access SP.WorkflowServices.WorkflowServicesManager from NAPA (CSOM) I am getting error : Cannot read property 'WorkflowServicesManager' of undefined NAPA ...
2
votes
1answer
28 views

Using PowerShell with CSOM to grant permissions to AD security groups

I have been testing out the provisioning of team sites using Powershell CSOM calls working against an on premise SharePoint 2013 farm. Creating Team Sites this way is very easy. One of the great ...
0
votes
1answer
33 views

Retrieve file version metadata with CSOM

My organization is requiring that we rewrite all of our sandbox solutions as we shift to SP 2013 as provider-hosted apps using CSOM. One of the event receivers I wrote would previously use the ...
1
vote
0answers
21 views

Delete major version powershell csom

I have a document library where i have uploaded documents it has 2 major versions and i want to delete the first major version. Is there powershell csom code i can used to do this
3
votes
1answer
21 views

Enable Labels (via Retention policy) in List: How?

In my SharePoint App, I want to provisioning a document library and set the following list setting: Information management policy settings > Set source of retention to "Library and folders" ...
1
vote
1answer
58 views

CSOM Could not establish trust relationship for the SSL/TLS secure channel

using (var context = new ClientContext("https://848-sharepoint:16543")) { var ss = new System.Security.SecureString(); ...
0
votes
0answers
9 views

How to set site audit report document library location via CSOM

I am configuring site auditing via CSOM. Most of this is easily done via code. The one piece I cannot figure out, is how to set the document library where the audit reports are stored before ...
0
votes
1answer
15 views

CSOM : Exception of type 'System.OutOfMemoryException' was thrown

I am trying to get the details of users from User Profiles using CSOM. I have a list of users in Excel file(approx 20000). I am reading the excel file and storing data in DataTable, i am iterating ...
1
vote
0answers
16 views

Copy all folders in a library to another library [duplicate]

I have a Sharepoint library which is having 10 folders, i want to move those folders(along with files inside those folders) from one library to another library with in same site using CSOM**(C#)**. ...
1
vote
0answers
23 views

Is there any way to implement numbered pagination instead of PREV | NEXT using JSOM without using search

I'm wondering if there any way to implement Numbered pagination while retrieving items from a list like "PREV 1,2,3..NEXT" instead of just having "prev | next". I followed this code example MSDN and ...
0
votes
0answers
22 views

How to process list item copy through CSOM and Custom Ribbon Button in Sharepoint 2013

I am attempting to implement custom ribbon functionality in SP 2013. For this, I put a custom button on the ribbon and only enable it when ONE list item is selected (Custom List). This list also has ...
1
vote
1answer
57 views

Save Excel file locally using client object model and C#

I have a scenario where I have been able to get the file that I want to download using a CAML query. I am using client object model approach. I need to save this file locally. Please guide how can I ...
0
votes
2answers
76 views

Method “GetList” does not exist

I'm attempting to retrieve the details of a SharePoint list using the following: using (var ctx = new ClientContext("http://sharepoint/ci")) { var list = ...
0
votes
1answer
37 views

CSOM “invalid request” when including fields

When calling more than one field the query fails. No descriptive reason why. [Shorthand as typing on phone] Working code: Function getData(){ ctx = new SP.ClientContext(); u = ...
1
vote
0answers
53 views

jQuery not showing custom error messages in PreSaveAction method of sharepoint 2013 list “New Form”

I am validating sharepoint list fields on PreSaveAction method of sharepoint list new form. I have done some customization and have put some labels with error messages under the sharepoint formfields. ...
0
votes
0answers
33 views

File not found error when uploading file using CSOM

I am using following code to upload file at the following location but getting File Not Found error at last line "clientcontext.ExecuteQuery();" using (ClientContext clientcontext = new ...
1
vote
1answer
87 views

Modifying Global Navigation Settings in SharePoint Online

I am working on a PowerShell script to provision a site collection with a predefined hierarchy. Since the PowerShell breadth is so limited, most of this is done via functions that are CSOM code. As ...
0
votes
0answers
17 views

Add new webpart property to webpart xml in Sharepoint 2013

Currently I'm trying to use This answer to add a web part with XML through CSOM. But i need to define a new webpart property called "DataSiteURL" (String) for my webpart. Is it possible to change the ...
0
votes
1answer
37 views

Sharepoint Code to break inheritance and add new permissions at custom list level

I have a site collection with permissions set up as: EVERYONE READ I have a custom list. Here, I want to add permissions as EVERYONE CONTRIBUTE. I want to remove the Everyone Read Access Permssions ...
0
votes
0answers
24 views

Hiding a web part programatically using CSOM

I have gone through this article in MSDN: https://msdn.microsoft.com/en-us/library/office/ee539301(v=office.14).aspx There is no example mentioned to hide a webpart. I am trying to programatically ...