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
0 answers

find out what item id failed executeQueryAsync item creation

How can i find what item failed executeQueryAsync add item method ? this is my code : var itemArray = []; var siteUrl = "http://MySite/MM/cm"; var clientContext = SP.ClientContext.get_current(); var oList =…
0
votes
0 answers

"Value does not fall in the expected range" during set FieldLookupValue of sharepoint 2013 list from Asp.net

I have a lookup column in a sharepoint 2013. I am trying to set value to that using FieldLookupValue from my asp.net ClientContext. It is throwing exception on clientContext.ExecuteQuery(). However the record gets inserted in the list. I also tried…
gee'K'iran
  • 431
  • 2
  • 7
  • 21
0
votes
1 answer

Get document libraries in SharePoint WebSite

I need to use sharepoint client api in my project and list documents in folders that uploaded to sharepoint. My folders are under the link "https://mydomain.sharepoint.com/sites/blsmtekn/dyncrm/Shared%20Documents/Forms/AllItems.aspx" using…
user5126784
0
votes
1 answer

Get the value of a sharepoint content field on a publishing page from a provider hosted app

From a SharePoint Add-in, provider hosted, using C# and the client object model, I am trying to get the value of a sharepoint content field on a publishing page. I tried first: List list = clientContext.Web.Lists.GetByTitle("Pages"); ListItem item =…
Cyril
  • 134
  • 1
  • 4
  • 15
0
votes
2 answers

SharePoint CSOM C# Load Query with Where Clause Performance

How does SharePoint CSOM handle this block of code? FileCollection allDocs = libFolder.Files; clientContext.Load(allDocs, files => files.Where(file => file.Name == "test.docx"); clientContext.ExecuteQuery(); if (allDocs.Count > 0) { File…
InvoiceGuy
  • 22
  • 2
  • 10
0
votes
2 answers

Sharepoint How to do get request to external web service

How can I make get request from Sharepoint object model to external web service? I tried did it with ajax request: $.get("http:/servername/webservice_name", function(data, status) { alert("Data: " + data[0] + "\nStatus: " + status); }); But I have…
Dim
  • 532
  • 1
  • 6
  • 23
0
votes
0 answers

Performance problems with streaming large xml file

Maybe someone can help me out with the following problem. Im streaming a xml file(40mb) from sharepoint with client object model: protected void Page_Load(object sender, EventArgs e) { FileInformation fileInfo =…
user3114347
  • 349
  • 1
  • 5
  • 19
0
votes
2 answers

Client-side SharePoint PowerShell - Get list items - The collection has not been initialized

On SharePoint 2013, I am trying to get list items, with client-side SharePoint PowerShell. Even for field Id or Title, I encounter this error: The collection has not been initialized. I don't know how to include fields. I find many exemples in C# or…
0
votes
1 answer

Create new Wiki with Metadata

I am trying to create new Enterprise Wiki with Client Library in C#. I have some issue with adding Categories. On the web page I can create WikiPage and easily add our custom Categories. But it wont work with C#. Here is my code: for(int i…
0
votes
1 answer

ItemUpdated List Item Comparison

Is it possible to compare the properties listItemId with a field in a new list? I have an event receiver, I want to update a new list once an item in updated. I don't want to use GetItemById, I want to compare the first list auto generated ID with a…
0
votes
1 answer

Sharepoint Client Object Model: Read out Version properties

I' reading out the versions of my List with the following code: string fileUrl = "/sites/dev1/MyTool/Lists/TicketsList/1_.000"; FileVersionCollection fileVersionCollection; File file =…
D. Müller
  • 3,336
  • 4
  • 36
  • 84
0
votes
1 answer

Sharepoint Online: Show List as part of the .aspx site

What are the possibilities to show a list as a part of a .aspx site? I need this to show two different lists on one page. It would also be optimal if the standard list functions like sorting etc. would still be available. Is there a way to show the…
D. Müller
  • 3,336
  • 4
  • 36
  • 84
0
votes
1 answer

Sharepoint: Binding GridView with SharePoint List (Client Object Model)

I want to show a list on an .aspx site. Therefore I have to use the SP client object model. I found the following tutorial, but this doesn't use the client…
D. Müller
  • 3,336
  • 4
  • 36
  • 84
0
votes
1 answer

Sharepoint Online: Are attachments also delete on deleting a ListItem?

Will the ListItem's attachments also be deleted if I call the ListItem.DeleteObject method which deletes my item? Or are the attachment files still on my server? How can I check this? I use the client object model!
D. Müller
  • 3,336
  • 4
  • 36
  • 84
0
votes
1 answer

Sharepoint Online: Copy attachment of list item to a new item using Client object model

I want to read the attachments from one list item (in ItemCreated event) to another, new ListItem. How can I do this with the Client Object Model? All I found is server-side code... Another question: Are the attachments also deleted when I delete a…
D. Müller
  • 3,336
  • 4
  • 36
  • 84