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
2
votes
2 answers

Get Sub-Files with folders' IDs - Client Object Model

I want to get some folders - sub files. I have all folders SharePoint ID in a list. My code is working but it's performance very bad because there is a lot of context.ExecuteQuery; I want to make it maybe with a Caml Query. using (var context = new…
2
votes
2 answers

How to get email addres from PeoplePicker field using C# and Client Object model

I am using CAML to retrieve some sharepoint list items. On of the columns is a PeoplePicker control. How can I extract the email address from this column? I know how to get the LookupValue and LookupID, but not the email. FieldUserValue usvSM1 =…
Ashton
  • 1,265
  • 14
  • 23
2
votes
1 answer

Paging Issue SP 2010 with C#

Paging is not working in here, the error it says : The query expression is not supported. Error occurs in this line: clientContext.Load(listItems, itms => itms.Skip((PageNumber - 1) * PageSize).Take(PageSize)); Could someone advise Please? Thanks …
Hari Gillala
  • 11,736
  • 18
  • 70
  • 117
2
votes
1 answer

How to dispose client context (sharepoint online) in wcf?

I am getting data from sharepoint online using WCF that is hosted in IIS. I decided to handle all my errors using this example. In my code I am using ClientContext class that needs to be disposed in a right way ClientContext _context = new…
Alexandr
  • 5,460
  • 4
  • 40
  • 70
2
votes
1 answer

clientContext.Site vs clientContext.Web difference

What is the difference between clientContext.Site and clientContext.Web when using the Client Object Model?
sakura-bloom
  • 4,524
  • 7
  • 46
  • 61
2
votes
4 answers

Failing to activate a feature using COM in SharePoint 2010

Guid featureId = new Guid("0af5989a-3aea-4519-8ab0-85d91abe39ff"); ClientContext clientContext = new ClientContext("http://mysite:786/"); Site clientSite = clientContext.Site; …
vikbehal
  • 1,486
  • 3
  • 21
  • 48
2
votes
2 answers

Uploading sharepoint document exception using SaveBinaryDirect

I have a Windows Application that saves .pdfs to a SharePoint Document Library. It works fine except this one file. Whenever I use SaveBinaryDirect with this 10.1MB file I get the following exception: System.Net.WebException: The underlying…
2
votes
1 answer

SharePoint.Client Get all folders recursively

I would like to call clientContext.ExecuteQuery() once for a site to improve performance. The collections of things I want to load includes all the folders and files for all document libraries within the site. When I say ALL I really do mean ALL.…
The K2 Guy
  • 21
  • 1
  • 3
2
votes
1 answer

Sharepoint 2010 client model. Set multiple values in taxonomy field

How can I set multiple values in taxonomy field using client model? For single value I use follow snippet: var item = ctx .get_web() .get_lists() .getByTitle('News') .getItemById($("#newsId").val()); var newTag =…
user1820686
  • 2,008
  • 5
  • 25
  • 44
2
votes
1 answer

Rename File Using SharePoint Client Object Model?

This may seem like a stupid question but I can't seem to find any answers on Google. I have written a method to query SharePoint and rename a document based on the document name parameter I specify. I have used a similar method to rename folders and…
2
votes
3 answers

Client-side SendEmail-Method doesn't work

I want to send emails using the SharePoint 2013 Client Object Model SendEmail-Method, but I always get an "A recipient must be specified." error. I tried it with different email addresses and several SharePoint servers, but the error occurred in all…
user2051498
  • 21
  • 1
  • 2
2
votes
1 answer

How to retrieve rendered Sharepoint WebPart Data using Client Object Model

I am trying to access data remotely from sharepoint 2010 site using client object model. For some restrictions I am not able to use CAML query even if I use I am not able to filter for proper audiences based on user login (if you can help me…
2
votes
1 answer

Sharepoint 2013 users which are programmatically added using Client Object Model cannot contribute to document library

I have a problem with user permission of users which are programmatically added to Sharepoint 2013 group using Client Object Model. The web application allows anonymous, but I also have a document library "Teacher Documents" with contribute…
2
votes
1 answer

How does a Queryable Load work in SharePoint?

Could anybody help me to understand what kind of work is going behind the scene, when LINQ is used for retrieving SharePoint objects. For example, I can use a code like this: private IEnumerable newLists; var dt = new DateTime(2010, 3,…
Warlock
  • 7,321
  • 10
  • 55
  • 75
2
votes
2 answers

How to convert string to Color in SharePoint Client Object model for silverlight?

I need to convert a string which has the name of a color (e.g. "Red") to an object of System.Windows.Media.Color. I am using the following code: using System.ComponentModel; TypeConverter tc = new TypeConverter(); Color bgColor =…