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

Creating a SharePoint 2010 page via the client object model

I am attempting to create pages in a Sharepoint 2010 pages library via the client object model but I cannot find any examples on how to do it. I have tried two approaches: The first is to treat the Pages library as a list and try to add a list…
2
votes
1 answer

Sharepoint 2010 ECMAScript Object Model: Insert, Update, Delete

is it possible to add a new Item to a list / delete it / update it via ECMAScript Object Model? All I've found is about reading items. Are all the CRUD operations supported? If so, can you provide me with a link to the documentation explaining it?…
pistacchio
  • 56,889
  • 107
  • 278
  • 420
2
votes
1 answer

Sharepoint AudienceUriValidationFailedException while creating ClientContext with RER properties

I am using SharePoint Provider Hosted app. While RER triggers i am generating client context with help of Token helper function using (ClientContext clientContext = TokenHelper.CreateRemoteEventReceiverClientContext(eventReceiverProperties)) { …
2
votes
2 answers

Sharepoint ClientObject Model download files C#

I am trying to download files from a SharePoint library using the client object model. I seem to be able to access the files using OpenBinaryStream() and then executing the query, but when I try to access the stream, it is a stream of Length = 0. …
Crash5998
  • 336
  • 5
  • 12
2
votes
0 answers

JSOM Update web part properties doesn't always work

Here is a code snippet (there is applicable code to get to this point, of course): var properties = oWebPart.get_properties(); properties.set_item("FilterDisplayValue1", "M"); properties.set_item("TitleUrl",…
2
votes
2 answers

Sharepoint 2010 User Authentication (windows Credential) with Client Object Model

I am trying to login to a SharePoint website that uses Windows Integrated (NTLM) authentication. There are 2 ways to enter credentials for the SharePoint website, Windows Authentication and form authentication. However, Form authentication is…
Rana
  • 1,675
  • 3
  • 25
  • 51
2
votes
1 answer

Cannot Refer to Microsoft.SharePoint.Client.dll

I am creating a Windows application the will access a sharepoint website. There for I need to use Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.runtime.dll in project. I have add them in my references but cannot use it. Can someone…
Rana
  • 1,675
  • 3
  • 25
  • 51
2
votes
1 answer

connecting to sharepoint oniline using Powershell : Cannot find an appropriate constructor for type Microsoft.SharePoint.Client.ClientContext

Hi I am trying to connect to sharepoint online and publish calender using the data from a SQL Table and I am getting the following exception , please advise.The same code works fine with slight modification on a on prem sharepoint server I have…
2
votes
2 answers

Sharepoint Client Object Model Updating Property of a only one folder

I am working on a sharepoint clientobjectmodel code. There is a folder called "John Details" inside "User Details Folder". I am trying to update 2 properties for the "John Details" folder. How do I do that? Public Void…
Kurkula
  • 6,386
  • 27
  • 127
  • 202
2
votes
1 answer

How to create folder and subfolder using client object model-Javascript

I have a custom list form, we need to create one folder in doc library with folder name equal to list item title.and then should immediately create 3 folders in that newly created folder. I could create top level folder after capturing list item…
Rohit
  • 284
  • 1
  • 3
  • 14
2
votes
2 answers

Closing showWaitScreenWithNoClose in SharePoint CSOM

I am creating a list using REST APIs. In my JavaScript code I have written something like this: // If I declare 'waitDialog' then it is not get closed by // calling 'waitDialog.close()'. Without any declaration it works. var waitDialog; function…
Naveen
  • 6,786
  • 10
  • 37
  • 85
2
votes
2 answers

Sharepoint: How to easily get related child items using JSOM

Suppose I have 2 Lists: Teams and Employees. Each team has a number of employees: Teams ID Name Employees ID Name TeamID (foreign key of Teams) Is it possible to write a query in SharePoint JSOM such that I could do something along the…
New Dev
  • 48,427
  • 12
  • 87
  • 129
2
votes
1 answer

client object model add content type to list

I have created an SP.List item "lst". I also: lst.ContentTypesEnabled = true; lst.Update(); clientContext.ExecuteQuery(); I have searched the AvailableContentTypes and found the one I want to add to lst. I then: SP.ContentTypeCollection…
2
votes
1 answer

Convert Date field while retreiving from Sharepoint list in client object

I am creating a windows forms which loads list items from sharepoint client object model. I am having issue with Date field which is giving +1 day or -1 day i.e if i have entered date as 5/5/2014 it gives 5/6/2014 or sometimes…
xamarin cool
  • 83
  • 1
  • 9
2
votes
1 answer

How to impersonate admin user for creating OneDrive or Personal Site?

I am creating personal site in office 365 using csom as follows private void createPersonalSite() { try { //using (SPSite site = new SPSite("Site URL")) //{ …