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
1
vote
2 answers

how to get approval status field value in sharepoint client object model

How can i get list item approval status value using client object model in sharepoint? Here is my sample code on fetching other attribute values. ClientContext.Load(listItems, items => items.Include( item =>…
1
vote
1 answer

Sharepoint's Client Object Model with Silverlight, is it possible to load web.Language with executeQuery?

Is this: Web web = context.Web; context.Load(web, w => w.Language); context.ExecuteQuery(); or something similar in order to load web.Language with context.ExecuteQuery() possible in a silverlight client? The above code was taken…
Julia
  • 318
  • 1
  • 5
  • 14
1
vote
1 answer

Get "Description" field from SharePoint Document Library using Client Object Model

I'm using the following code: ClientContext ctx = new ClientContext("SiteUrl"); List lst = ctx.Web.Lists.GetByTitle("DocumentLibraryname"); CamlQuery cq = CamlQuery.CreateAllItemsQuery(); ListItemCollection lic = lst.GetItems(cq); ctx.Load(lic,…
rross
  • 2,236
  • 11
  • 36
  • 41
1
vote
1 answer

How to read a column type SPUser, DateTime, Currency with EcmaScript?

I have a list in SharePoint 2010 with some columns. All are default types. So I have "Single line of text" "Multiple line of text" "Date and Time" "Choice" "Number" "Currency" "Person or Group" My aim is to have a custom ribbon tab or group where I…
1
vote
0 answers

How to retrieve attachment file size?

Possible Duplicate: How do I get the filesize from the Microsoft.SharePoint.Client.File object? I'm connected from WPF application to Office365 using SharePoint Client OM. I want to do that is the file size of attachments. //SourceCode Web web =…
user834964
  • 103
  • 1
  • 1
  • 7
1
vote
3 answers

How to save bitmapimage in Isolated storage?

I am developing silverlight web part by using the client object model. I am getting the bitmap image from sharepoint server. Now I want to save this bitmap image in isolated storage. So I am using following code WriteableBitmap wb = new…
1
vote
2 answers

SP2010 Client Object Model: Uploading File to Drop Off Library Doesn't Apply Content Organizer Rules

I am currently developing a service using the SharePoint 2010 Client Object Model to programmatically upload Excel worksheets to a Drop Off Library and then set the properties on the file. This process is working well. However, the Drop Off Library…
lsuarez
  • 4,952
  • 1
  • 29
  • 51
1
vote
1 answer

Cannot list files/folders with the SharePoint Client API

I'm trying to use the official SharePoint Client library in C# (Microsoft.SharePoint.Client) to list files and folders in a SharePoint online site. This is how the site files look: Based on the URL (you can see it in the image), this is how I'm…
Master_T
  • 7,232
  • 11
  • 72
  • 144
1
vote
1 answer

Upload a file on a Sharepoint website through c#

I've a file library on a sharepoint 2010. I'm using the Sharepoint library and I want to upload a file. I found a lot of example about this, the problem is that I've some additional fields in the sharepoint file library, and I don't see how to…
J4N
  • 19,480
  • 39
  • 187
  • 340
1
vote
2 answers

CSOM Update File Document MetaData in a Subfolder of a library. Getting Error File Not Found

I have a list of URLs that are documents in a subfolder of a library. When I go to update the metadata of a document in the library but not in a subfolder code works as expected. But some documents in the list are in a subfolder. The URL has the…
Rog
  • 75
  • 2
  • 9
1
vote
1 answer

SharePoint item.File - ServerObjectNullReferenceException

I'm attempting to load information about all File Items in a list. In this snippet, item refers to a ListItem switch(item.FileSystemObjectType) { case FileSystemObjectType.File: if…
Thomas Harris
  • 573
  • 4
  • 14
1
vote
1 answer

Is there a way to create a new list item with other user using Microsoft.SharePoint.Client namespace

We have a SharePoint list in which each user has permission to view only records created by him. I have a task to write a service that generates list items, list item must be created by another user than the authenticated user of the server (for the…
Jonathan Applebaum
  • 5,738
  • 4
  • 33
  • 52
1
vote
2 answers

Sharepoint ClientContext is always returning code 401 when i try to connect

I'm trying to connect to a Sharepoint using ClientContext (Microsoft.SharePoint.Client lib). Unfortunately, when I execute the code that supposed to connect on Sharepoint Site, I'm getting 401 error. When I try to connect using a web browser it…
1
vote
1 answer

Upload file to SharePoint using Client Object Model - 401 unauthorized

I'm working on an SSIS script task that uploads a file to a SharePoint site and applies item level permission to the file. I use a windows account to establish a connection with SharePoint library like below. using (ClientContext ctx = new…
bala
  • 436
  • 1
  • 4
  • 19
1
vote
1 answer

Cannot Create List based in a Custom Templates that contains Custom Views using COM

I cant create a List based in a Custom List Template from Sharepoint 2013. The list is created correctly but not contain the views that is defined in the list template. In my code, first I get the listTemplate: ListTemplateCollection ltc =…