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

SP2013 CSOM C# Update List

ClientContext ctx = new ClientContext(Site); ctx.Credentials = new NetworkCredential(userName, passWord, "dmz"); List list = ctx.Web.Lists.GetByTitle(SpList); ListItemCollection items =…
0
votes
1 answer

Determine which list a provider hosted application has access to

I have created a simple Provider Hosted App ( straight out of the Visual Studio 2013 box ) The App has been granted "Read List Permissions" in the app manifest. When the app is deployed SharePoint Online asks the User to select the list that the…
user3658298
  • 341
  • 1
  • 5
  • 15
0
votes
2 answers

Using CSOM to fetch List Items in Provider Hosted SharePoint App

I have some simple code that uses CSOM to read the items in a SharePoint list hosted in SharePoint Online. List list = ClientContext.Web.Lists.GetById(id); ClientContext.Load(list, a => a.ItemCount, a =>…
user3658298
  • 341
  • 1
  • 5
  • 15
0
votes
1 answer

App Part issues, spPageContextInfo

I am trying to create an SharePoint hosted app that contains an app part, this app part should show what the user is following. I have used working code as an example in the app, but I don't get it to work inside of the App Part. I get this within…
0
votes
2 answers

CSOM Field.FromBaseType returns false, although the field is derived from another content type

I retrieve the FieldCollection of a content type via client side object model: var fields = contentType.Fields; clientContext.Load(fields); clientContext.ExecuteQuery(); Then I cycle through the fields and check if the field is derived: if…
Hinek
  • 9,519
  • 12
  • 52
  • 74
0
votes
0 answers

SharePoint 2013: Use credentials with REST or CSOM to query data

I have a scenario where a user has some data related to him in a SP on premises site (site1), but he doesn't have access to site1. The user is having access to another site2 where we want to have webpart/page to show him data related to him from…
Prakash
  • 109
  • 4
0
votes
1 answer

Unable to load RegionalSettings field/property Sharepoint CSOM

using (ClientContext context = SharePointManager.ConnectTo(site)) { var spTimeZone = context.Web.RegionalSettings; context.Load(spTimeZone); } Error message as shown: "Field or property \"RegionalSettings\" does not exist Double check…
user1166085
  • 617
  • 3
  • 12
  • 23
0
votes
1 answer

use javascript to retrieve multiple sharepoint lists

I was just wondering if its a good idea to load more than one list in the same function as all of them use the same success callback , Code example: function retrieveListItems() { var clientContext = new SP.ClientContext.get_current(); …
0
votes
1 answer

How to bulk create items in SharePoint list using javascript?

I have a list in SharePoint Online that has a custom HTML form. The form has the following structure: Country: Color: Type: (These are in a table/gridview and are repeatable/many) Name: Lastname: Gender: Age: My goal is to have up to 40 rows…
Jack Daniels
  • 3
  • 1
  • 2
0
votes
1 answer

When adding taxonomy values via CSOM Exception "Value cannot be null. ParamterName:termId" thrown

I am trying to set the value of a Sharepoint 2013 TaxonomyField in CSOM but when I execute the last context.ExecuteQuery(), after taxField.Update(), a exception is thrown that reads `A first chance exception of type…
Stephen Gilboy
  • 5,572
  • 2
  • 30
  • 36
0
votes
1 answer

prevent double meeting sharepoint calendar csom

I am trying to make it if the date and time are already booked in the calender dont book, i am using this code and nothing get displayed? Any Sugestions? var context = SP.ClientContext.get_current(); var web = context.get_web(); var list =…
Batistuta
  • 109
  • 1
  • 7
0
votes
4 answers

Exception CICONotCheckedOut when removing items from LookupTable using Project Server CSOM API

I have a Project Online solution and need to remove items from a LookupTable (Microsoft.ProjectServer.Client.LookupTable), because I need to clear it before I add new items. Primary use for this is to do unit testing where I create items and then…
Mattias Lindberg
  • 2,064
  • 3
  • 24
  • 34
0
votes
1 answer

Retrieve field groups from SharePoint CSOM

I want to retrieve the existing field groups (from root) and display them in a dropdown list. I'm using this code to retrieve all the columns (and display which group they're belonging to): var web = clientContext.Web; …
Robin
  • 740
  • 3
  • 12
  • 30
0
votes
2 answers

How to get SPProductNumber via Client Object Model?

I am looking for way to get SPProductNumbervia client object model. I have sharepoint app, and I need to connect client application and that app. To do this I need to get SPProductNumber. If there is not way, anyone know how to check it with…
0
votes
1 answer

Exception while creating Wiki page using CSOM

Using below function I am trying to create wiki Page: static void CreateWikiPage(ClientContext context, string pageName, string pageContent) { List wikiPages = context.Web.Lists.GetByTitle("Pages"); …
Aquarius24
  • 1,806
  • 6
  • 33
  • 61