Questions tagged [sharepoint-clientobject]

API to interact with SharePoint data remotely from script that executes in the browser

Source: Client object model resource center | SharePoint 2010: The new .NET managed, Silverlight, and ECMAScript (JavaScript, JScript) client object models in SharePoint Foundation provide powerful ways to interact with SharePoint data remotely from script that executes in the browser, from Silverlight applications, or from .NET client applications. These APIs include a subset of the features available in the server object model, providing access to objects at the site-collection level and lower within the SharePoint hierarchy.


SharePoint 2013 client APIs provides SharePoint client object model to retrieve, update, and manage data in SharePoint 2013. SharePoint makes the object model available in several forms:

  • .NET Framework redistributable assemblies
  • JavaScript library
  • REST/OData endpoints
  • Windows Phone assemblies
  • Silverlight redistributable assemblies

synonyms: client-object-model

281 questions
0
votes
1 answer

SharePoint Server Authentication Error

So I was working with a hosted SharePoint site before and everything was working fine when I authenticated to that site using the code below: private static NetworkCredential credentials = new NetworkCredential(username, password, domain); private…
This 0ne Pr0grammer
  • 2,632
  • 14
  • 57
  • 81
0
votes
2 answers

Getting DefaultView through client object model

I want to load fields of the default view for Sharepoint list through client object model (I am using Silverlight). Here are some relevant things I've found (on msdn here): class List has property DefaultViewUrl [of type string] class List has…
jumbo
  • 4,670
  • 5
  • 39
  • 44
0
votes
1 answer

C# CSOM Get List of ContentTypes in a Library

I can easily get a list of Libraries I can easily get a list of all ContentTypes But having trouble getting a list if libraries and what contenttypes belong to that library. Can anyone assist wtih this request? We utilize a library and have a small…
Rog
  • 75
  • 2
  • 9
0
votes
1 answer

Sharepoint client object model. How to get current list view?

Sharepoint list contains 6 views. I am staing on sharepoint page where items filtered by list view query. how can i get current view or view title with client object model?
Ievgen
  • 4,261
  • 7
  • 75
  • 124
0
votes
1 answer

Pass Logic App credential to custom SharePoint Client C# Function App SharePoint

I have created logic apps in Azure that uses my credential to connect to our SharePoint Online sites and then run without me being around. I want to perform more complex operations on the SharePoint sites and would prefer to create a C# Function…
0
votes
0 answers

Connecting SharePoint 365

I try to connect a sharepoint list using SharePoint 365. For manual access, the browser is opening connecting to https://login.microsoftonline.com and I have to Sign In using my Email-Address - no password is needed. Looks like this: Now, I want…
0
votes
1 answer

How to resolve exception when uploading file to SharePoint using List.RootFolder.Files.Add (C#)

Context: I am trying to upload a large number of files to a SharePoint library. I will call the library Library Name here. For simplicity, I will only be attempting to upload one file in the code that follows. The path to this file will be…
0
votes
1 answer

How do I speed up below Sharepoint CSOM code?

I have below CSOM code to delete all list items from the list. But it is very slow. How can I make it faster. public void DeleteListData() { string root = "mysite.com/"; using (ClientContext clientContext = new…
0
votes
1 answer

Sharepoint 2010 - Client Object Model Upload content to document library

I have the following requirement: I have created a Flash application that is embedded in a Sharepoint Application Page. In the Flash application I have to upload text (I cannot create a file on the client side without prompting the user, so I just…
0
votes
1 answer

When adding item to List, I get error Invalid data has been used to update the list item. The field you are trying to update may be read only

I'm using Client Object Model to update a list on SharePoint. The list is very simple, it only has 3 columns ([Title], [Author], [Year Published]) [Title] is the standard column added by default, [Author] is my own column and it is a string field…
FLICKER
  • 6,439
  • 4
  • 45
  • 75
0
votes
0 answers

How to Delete rows from SharePoint.Client.ListItemCollection C#

I have taken the data in ListItemCollection from SharePoint client object. Now I am looking for some solution by which I can remove some rows(ListItem) temporary from ListItemCollection based on some column value. This should delete rows from…
Gourav
  • 1
  • 1
0
votes
1 answer

"An invalid argument was supplied" error when I try to connect sharepoint online using SharePoint Client Object Model with .NET application

I am trying to connect SharePoint online (office 365 cloud base) through c#.net code.I am using "Microsoft.SharepointOnline.CSOM" Nuget package version V16.1.7414.1200 and application .net framework 4.5.2. I already tried all different type of code…
niks
  • 125
  • 1
  • 9
0
votes
1 answer

SharePoint Online: Get Document Library Children Count Using CSOM

My requirement is to get the children item count of Document Library using CSOM. The count should only be the immediate children count, and should not include the sub-children count. I am trying to use below code to achieve this: var…
Saket Kumar
  • 4,363
  • 4
  • 32
  • 55
0
votes
1 answer

CSOM Caml Query to return list folder sub items

I'm trying to return only list items for a given list folder. However each time i execute the following I get all items in the list. What's the easiest way to only get list items for a particular folder of a SharePoint list? CamlQuery camlQuery =…
Mike
  • 780
  • 1
  • 5
  • 26
0
votes
0 answers

Sharepoint sortable gridview rows

I´m new to sharepoint development and I´m trying to make a list presented in a gridview sortable. The requirement is that the rows can be reordered in any way and then the change must persist. So far i am able to sort the rows using jquery sortable,…