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

SharePoint Client Object Model (COM) File Version Information

I am trying to get some basic file version information using the new SharePoint Client Object Model (COM) with SharePoint 2010. I have successfully loaded and queried for my ListItem, File, and FileVersionCollection like this: using (ClientContext…
1
vote
0 answers

Provider hosted app - how to get FedAuth and rtfa cookie of the current logged-in user

I am using Provider-Hosted App for Office 365. I want to get version collection of list item, for that just tried to access using list.asmx service. To call this SP service, have to pass cookie(FedAuth and rtFa). but i have only accesstoken with me,…
1
vote
1 answer

Sharepoint Client Object Model: Usage of Load / Update / Delete methods

Can someone explain the differences or the reasons why there're the two methods ClientContext.Load and e.g. for ListItems ListItem.RefreshLoad()? Is there a difference? Why has the ClientContext no equivalent .Update or Delete methods? And when do I…
D. Müller
  • 3,336
  • 4
  • 36
  • 84
1
vote
0 answers

Microsoft.SharePoint.Client.ServerException when a list item have a 2G attachment

In SharePoint online, the size limit of an attachment is 2G. However, when we tried to get FieldValuesAsText property with that list item, we got this exception: Unhandled Exception: Microsoft.SharePoint.Client.ServerException: Value was either too…
Matt
  • 6,010
  • 25
  • 36
1
vote
1 answer

Convert CSOM to JSOM easily?

is it possible to convert or migrate easily a C# written web service from CSOM to the JavaScript object model JSOM? I think its mostly the "same" - except few things which are really really different. Maybe there is a tool for it or you have great…
1
vote
2 answers

How do I loop through Files in a Folder and get the data from associated List columns?

I'm new to the Sharepoint client object model and I'm having difficulty getting all of the items from a particular List along with their column data. I think it's confusing me because it's actually a Folder set to display as a List which is then…
Equalsk
  • 7,954
  • 2
  • 41
  • 67
1
vote
1 answer

Sharepoint Client Object Model The property or field has not been initialized

I have a C# program that manages Sharepoint lists using the Sharepoint Client Object Model. Occasionally we will have server issues which will prevent the program from accessing the sharepoint server. I am using a helper class to run the…
Diggs
  • 81
  • 1
  • 6
  • 11
1
vote
2 answers

Change the "Make "New Folder" command available?" option with Sharepoint Client Object Model

I got a lot of sites with document libraries where the "Make "New Folder" command available" option is set to "no". I would like to walk through these document libraries and change this to "yes". How can I achieve this? After doing some search, I…
vilmarci
  • 451
  • 10
  • 31
1
vote
1 answer

How to resolve String was not recognized as a valid DateTime. - Client Object Model Sharepoint on Premise

I have written a script that imports data into a from a specified CSV file to a list in a specified SharePoint 2013 site (on premise). However, when I come to run the script, I get these two errors: I understand why I am getting these errors. It is…
user4258956
1
vote
1 answer

How to use the javascript getPeerUrl() function in Sharepoint 2013 client object model?

I want to use this function https://msdn.microsoft.com/en-us/library/office/jj954403.aspx to get the french url from the english url (I can't just simply change the en to fr and vice versa). But I am having trouble with the function. It seems to…
omega
  • 40,311
  • 81
  • 251
  • 474
1
vote
0 answers

object does not belong to a list error when loading file using clientcontext

I am trying to load a file and its properties in sharepoint Microsoft.SharePoint.Client.File newFile = null; newFile = clientContext.Web.GetFileByServerRelativeUrl(relativeURL); ListItem item =…
Vignesh Subramanian
  • 7,161
  • 14
  • 87
  • 150
1
vote
1 answer

field or property \"ListItemAllFields\" does not exist exception

Below code credit goes to Vadim Gremyachev. My goal is to grant user access permissions to certain SharePoint folders by using the CSOM. The goal I am trying to achieve is to access the library called JZhu, and inside JZhu library, I have two…
OPK
  • 4,120
  • 6
  • 36
  • 66
1
vote
1 answer

How to grant user permission to certain folders using Client Object Model?

So far I am able to grant user certain permission with the following code: ClientContext context = new ClientContext("http://myRealURL"); Principal user = context.Web.EnsureUser(@"myLoginAccout"); RoleDefinition readDef =…
OPK
  • 4,120
  • 6
  • 36
  • 66
1
vote
1 answer

Client Object Model, cannot find site user?

I am getting ServerException when running the program. Here is my code: ClientContext context = new ClientContext("http://myRUL"); Principal user = context.Web.SiteUsers.GetByLoginName(@"myRealAccoutLoginIn"); RoleDefinition readDef =…
OPK
  • 4,120
  • 6
  • 36
  • 66
1
vote
2 answers

Get file name from document library

I have a document library named DocLibrary. Inside that, I have created few folders. Each folder have 3 other folder. Inside that, I store the specific files. Example: DocLibrary > NF1> Communications, where DocLibrary is the document library, NF1…