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

Get items from current view/filter in Sharepoint 2010 - using client object model

How can I get just the items in the user's current view/filter? Using Sharepoint 2010 Client Object Model (i.e. Javascript/ECMAScript). A user could select a view that shows a subset of the items available in the library or list, and they could…
Chalky
  • 1,624
  • 18
  • 20
4
votes
2 answers

Sharepoint 2010 client object model with camlQuery - file download but no content / 0 byte

I'm trying to download a txt file from a subfolder within a folder in a document library. I'm using camlQuery to achieve this. Unfortunately, i get no content of the txt file. It has 0 byte. public void SaveFolderFiles(string fileName, string…
float
  • 1,265
  • 5
  • 22
  • 38
3
votes
2 answers

Add users to UserMulti field type using Client Object Model

I'm bit of a SharePoint noobie so please bear with me. I need to be able to create a new list item in one our custom list using the client object model. I have been following the example described on the MSDN site and for the most part this has…
stephenl
  • 3,119
  • 4
  • 22
  • 22
3
votes
2 answers

Querying files in SharePoint ClientObjectModel API

I'm using the SharePoint Managed Client Object Model API to retrieve files from SharePoint to my console app which is written in C#. My code (abbreviated here) looks something like this: ClientContext clientContext = GetClientContext(sitePath); Web…
Mark Atkinson
  • 161
  • 2
  • 7
3
votes
1 answer

Sharepoint Client Object Model query filter not working

I am using the client object model to query a record in a list. It filters by the Title which is unique so I would expect it to only return one record but it is returning the entire list. Here's the code: FieldLookupValue result = new…
dcinadr
  • 665
  • 2
  • 7
  • 24
3
votes
1 answer

How to impersonate using silverlight client object model?

I am developing silverlight web part for sharepoint 2010 in C#.In silverlight client object model the sharepoint 2010 takes the current user credential by using the following statement ClientContext clientContext = ClientContext.Current; Now I…
3
votes
2 answers

Problem With Uploading Large Image File to SharePoint

so I have a script that essentially iterates through a bunch of delimited text files and uploads the images from said files to a SharePoint site. It works great, expect with one minor problem, I have a couple of images that are >4MB in size and…
This 0ne Pr0grammer
  • 2,632
  • 14
  • 57
  • 81
3
votes
3 answers

How do you create a page using the API for sharepoint 2010?

I have just started using Sharepoint Foundation 2010 and I'm trying to write a function from c# to add pages to a site. I got some code working to create a new site, but I can't seem to find any documentation about adding a page to an existing site…
Matt
  • 322
  • 6
  • 12
3
votes
1 answer

Update ListItem from Client Objectmodel without changing the version

Is it possible to update the Created/Modified fields using the Sharepoint Client ObjectModel without updating the version? var file =…
Marco
  • 337
  • 3
  • 10
3
votes
1 answer

SharePoint 2010 Ribbon Hide/{Show on Library Item Selecting or other event}

I am branding SharePoint 2010, and I hide the Ribbon by default and show when the user clicks a down arrow. The user can hide it again by clicking a hide icon. JQuery toggle and toggleClass work great
3
votes
2 answers

How to create a subfolder using sharepoint Client Object Model

How to create a subfolder using Client Object Model. I know how to create a folder under a document library but i dont know how to create a folder under a folder or a listItem.
Gaby
  • 2,923
  • 4
  • 38
  • 52
3
votes
1 answer

C# Sharepoint.Client - Return all files and folders from a given subfolder

I am trying to return all files and folders in a SharePoint library starting from a given subfolder. If I set the FolderServerRelativeUrl on the CamlQuery to the folder i wish to start from, I can get all the list items for that given folder;…
Dohsan
  • 361
  • 2
  • 12
3
votes
2 answers

How to associate a SharePoint workflow using the Client Object Model?

Using the SharePoint Object Model (SP 2010), how can you associate a workflow with a given list? I've been able to associate a workflow, but the configuration settings do not get saved back to SharePoint. In other words, the…
Metro Smurf
  • 37,266
  • 20
  • 108
  • 140
3
votes
2 answers

C# - Add a File as Attachment to Microsoft.SharePoint.Client.ListItem (SharePoint 2010)

I have no more ideas. I want to create a new element to Sharepoint List and adding a file as an attachment. I can create a new element with ListItem. But the file will not upload. I try with SaveBinaryDirect() function and with…
3
votes
1 answer

Unable to use SaveBinaryDirect with Sharepoint online always return 403

i am new with SharePoint, I am trying to upload a picture inside a document library by c# code. There is my code string webUrl = "https://mysharepointesite.sharepoint.com/"; string targetSite = webUrl; using (ClientContext ctx =…
1 2
3
18 19