Questions tagged [csom]

CSOM (Client Side Object Model) is a web services-based API of SharePoint allowing easy remote access to data and SharePoint's functions.

CSOM, which stands for Client-Side Object Model, is a web services-based API of SharePoint. It allows access to SharePoint data and features from remote clients. CSOM was introduced in SharePoint 2010 and greatly enhanced in SharePoint 2013.

Both JavaScript and .NET bindings to CSOM exist. Software leveraging CSOM can integrate with SharePoint without the need to run within a SharePoint farm.

In SharePoint 2013 CSOM is the only API available to software built using the new Apps for SharePoint architecture. Apps for SharePoint run side-by-side, typically in the cloud, and integrate with both cloud and on-premise SharePoint farms.

Corresponding MSDN documentation is located here, with separate JavaScript and .NET API references. The web services-based API underlying CSOM has been documented as part of Microsoft's Open Specifications initiative.

941 questions
-1
votes
5 answers

continue execution after try catch block

I want to show the "Successfully saved" message and then want to continue with next try-catch block. I tried 'finally' but it says 'control cannot leave the body of finally block'. Following is my code. try { //some code return…
Anjitha
  • 69
  • 1
  • 1
  • 7
-1
votes
1 answer

Creating Folders dynamically using CSOM in sharepoint causes ID issues for the document

I am creating the nested folders dynamically for a document library and uploading files. The below code is working fine. but the issues is whenever i uploading the file to the existence folder the ID of the document for the uploaded documents is …
TARUN
  • 241
  • 1
  • 8
  • 27
-1
votes
1 answer

Why does this code result in an infinite loop?

I had to print the list of the subwebsites under a sharepoint site using CSOM. i used this code and my server credentials but i go inside a infinite loop at 2nd line of foreach loop. The line is getSubWebs(newpath); static string mainpath =…
kaarthick raman
  • 793
  • 2
  • 13
  • 41
-1
votes
2 answers

JavaScript function that waits until executeQueryAsync is ready?

Is there a possibility to make some delay? I call a function in a while loop. This function calls executeQueryAsync which has to finish before the loop continues. When I use an alert my code works but without it doesn't. while…
-1
votes
2 answers

How to copy file from one library to another library using CSOM?

I need to copy a particular file from one library to another library. At first, need to check if file is existing in that library. If Existing, then need to overwrite file content and new sharepoint version should be updated for that document. I…
-1
votes
1 answer

Sharepoint 2013 file copy

I have a requirement.when a file is uploaded to document library,if a PDF file is uploaded then it should be routed to another Site collection’s library.with the help of OOTB or workflows or rest calls or CSOM. Please let me know if any body worked…
raghu ram
  • 11
  • 1
  • 5
-1
votes
1 answer

Edit a word document from Sharepoint 2013 in javascript CSOM

I have a requirement using CSOM JavaScript on SharePoint 2013 to get a Word document from a list, edit the document by searching for text and replacing it and then saving back to a list. Prefer if document is not visible to the user and this is all…
ChrisH
  • 1
  • 1
-2
votes
2 answers

Sharepoint 2013 On-Premises C# CSOM Cross Site Collection List Access

I see this has sorta been asked a bunch times before, but all the examples I am running across will not work or are in JavaScript , I NEED HELP WITH C# please. I have a farm with server site collections on it, I successfully created a provider…
ksliman
  • 595
  • 1
  • 8
  • 21
-3
votes
2 answers

unable to parse a string of this format "1/29/2020 12:00:00 AM" into a valid DateTime

I am working on a SVC service, and when I run it locally I get the Date field as follow 30/01/2020 00:00:00 and I parse this string to be a DateTime as follow (DateTime.ParseExact(i["ProjectLastUpdate"].ToString(), "dd/MM/yyyy hh:mm:ss",…
John John
  • 1
  • 72
  • 238
  • 501
-5
votes
1 answer

I want to retrieve the web's properties, but why I can not find .Load

I want to retrieve the web's properties, but why I can not find .Load? ClientContext con = new ClientContext("https://example.com"); Web web = con.Web; con.Load(web);
Mind
  • 1
  • 1
-9
votes
1 answer

How to upload (multiple) files to SharePoint Online using CSOM?

I have a Web Form that uploads some inputted data to a SharePoint list as a new list item which works well. I tried to add a new code to upload two files via two separate controls. The following code in protected void…
TylerH
  • 20,799
  • 66
  • 75
  • 101
1 2 3
62
63