Acronym for Client Side Object Model. It comprises both managed (.NET) and JavaScript object model (JSOM)

learn more… | top users | synonyms

13
votes
2answers
837 views

REST and CSOM much slower than List Web Service

lists.asmx = Web Service listdata.svc = REST API client.svc = CSOM Using JavaScript to query a list using the 3 available APIs, I'm finding lists.asmx responds much faster than listdata.svc or ...
9
votes
2answers
2k views

SharePoint 2013 CSOM: Is it better to pass a Context object around or a Url?

In SharePoint 2013 CSOM is it better to pass a Context object around, or a Url to open a context? Which would be the best example: (Please consider there may be a lot of methods preforming tasks) ...
6
votes
3answers
984 views

Get if user has permissions to access to a Cloud App for Sharepoint 2013 with JavaScript CSOM or Rest Api

I have developed a Cloud App for SharePoint 2013 on an office 365 server, and I figured out that to set the user permissions(who has access to it) for that app can be find over ...
6
votes
2answers
1k views

Get list item “Likes” using JSOM or REST API's?

How can you retrieve a list items "Likes" using the JSOM or REST API's? I know there is the following method: SP.Social.SocialFeedManager.getAllLikers(postId), but in testing I was not successful ...
6
votes
1answer
839 views

Previous versions of ListItem with CSOM

When using Client-Side Object Model for SharePoint 2013, how can I access previous versions of List Item?
5
votes
2answers
2k views

How to get List by Url using SharePoint 2013 CSOM

SharePoint 2013 CSOM API contains the following methods for accessing List object: ListCollection.GetById method - returns the list with the specified list identifier ListCollection.GetByTitle ...
5
votes
2answers
5k views

CSOM get list items, return simple data structure

If we take this code example, we can see we need to call a lot of methods to get to our results (.getEnumerator(), .get_current(), .get_title(), .get_title()) var siteUrl = '/sites/MySiteCollection'; ...
5
votes
1answer
924 views

Sharepoint Client context (client Object Model) cant load more than 500 records or more

is here any limitation about read the records from any lists in sharepoint? my codes are default that downloaded from msdn: string siteUrl = SharePointAddressURL; ClientContext ...
4
votes
2answers
2k views

How to enable publishing feature using CSOM?

How to enable site collection publishing infrastructure and site publishing features using CSOM?
4
votes
2answers
90 views

Hide document library using CSOM

I want to prevent users from accessing some document libraries. I have used the following code but it didn't work, Any solution? doclibraryinstanse.Hidden = true; doclibraryinstanse.Update(); ...
4
votes
2answers
1k views

Is it possible to create site collection using CSOM?

I have been trying out to create site collection using CSOM but unable to fins and class which creates site collection. I have read in MSDN that CSOM runs as site collection scope hence creating site ...
4
votes
3answers
923 views

Add web part so that we can retrieve it later via CSOM?

How to add a web part on page in such a way that we later on can find it (using CSOM) - Can we somehow store identifier information to the web part? Say user could change the title and description (so ...
4
votes
3answers
913 views

Set DateTime (utc) to listitem (CSOM, SP2013)

How to set UTC timezone to a listitem's DateTime field without executing query each time? This would be slow for many datetime fields and items: var utc = DateTime.UtcNow; var localTime = ...
4
votes
3answers
340 views

Deploying and Installing Sharepoint apps into App catalog using CSOM

Can anyone suggest me on how to use SP.AppCatalog() in JSOM or CSOM and get the all apps in AppCatalog, Not AppInstances..
4
votes
1answer
303 views

SP.UI.Status anonymously inaccessible

Using Office 365 (SharePoint Online) I have stumbled into an annoying thing. Some parts of the JavaScript CSOM does not seem to be accessible when your browse the site anonymously. If Firstly I tried ...
4
votes
1answer
508 views

Get webpart's Zone Id via CSOM

How to get Web Part Zone Id via CSOM? WebPart has property ZoneIndex but no ZoneId while WebPartDefinition has method MoveWebPartTo(string zoneID, int zoneIndex) but lacks methods to retrieve the ...
4
votes
1answer
337 views

Which web part properties can / cannot be edited using CSOM?

For a Content Editor Web Part for example it seems we can update Width but not Content: webPart.Properties["Width"] = "100px"; webPartDefinition.SaveWebPartChanges(); clientContext.ExecuteQuery(); // ...
4
votes
2answers
493 views

Get quick launch using CSOM (JavaScript)

On my publishing site I have changed its current navigation (quick launch) to use structural navigation, showing all items under current site. I see that the quick launch shows pages and sub sites for ...
4
votes
0answers
245 views

Adding an existing app part using the client object model( finding the xml)

I've recently found this nice thread on adding an existing webpart using the csom: Add an existing WebPart Using the Sharepoint client object Model I've tried the same approach for an app part (so an ...
3
votes
1answer
1k views

Custom Site Creation with CSOM

I have the need to customize the site creation process in SharePoint Online. Is this possible via an app using JavaScript CSOM? If so can anyone point me in the right direction.
3
votes
1answer
657 views

Change masterpage from Seattle to Oslo using CSOM, Sharepoint online

Using CSOM and c#, I would like to change the master-page from Seattle to Oslo. Can anybody help me?
3
votes
1answer
276 views

JavaScript CSOM. Is It Possible to Change Language for the SP.ClientContext?

I want to find a way to force CSOM to always return values in en-us (1033 locale). For instance, when I'm trying to get ContentType Name using ContentType.get_name() I end up getting different results ...
3
votes
1answer
2k views

How to add Client Web Parts (App Parts) to a page from JavaScript CSOM?

We're working on a custom way of adding and deleting Web Parts and App Parts to a page in SharePoint 2013. We have to use the new App way of developing and all code has to be using the JavaScript ...
3
votes
2answers
1k views

SharePoint 2013 get user groups by CSOM

I wrote some code to get the current user groups by CSOM. function getCurrentUser() { this.clientContext = new SP.ClientContext.get_current(); this.oWeb = clientContext.get_web(); ...
3
votes
2answers
208 views

Creating variation labels using CSOM in sharepoint 2013

Can anyone tell me how to create variation labels using CSOM?
3
votes
2answers
775 views

getting Regional settings in Javascript from CSOM

I am creating a custom data entry app in sharepoint using the CSOM. I need to update the default value of a datetime field, I can get the default value but the datetime is in UTC Format. I need to ...
3
votes
3answers
8k views

Retrieve list item using CSOM on SharePoint online isn't working

I've been stuck on this problem for couple days, I develop app model on SharePoint online using provider hosted model. From clientwebpart, i want to access sharepoint list item. I can access list ...
3
votes
2answers
801 views

Return Specific Content Type in Site Collection Using REST API

I am looking for a way to use the REST API to return specific fields of a specific content type so that I can bind it to a table. It seems the List API is used against a specific List but in my ...
3
votes
1answer
427 views

Get web part TypeName using CSOM

Can we retrieve the TypeName of a web part using CSOM?
3
votes
1answer
195 views

How to get list using CSOM (best practice)?

What would be the complete code for a best practice to get a list using CSOM? A couple of related questions: Should we always return all the lists first, and then run a linq query to select the ...
3
votes
2answers
1k views

How to default a Person FormField in New Form Template?

Without using any addons, has anyone discovered a way to set a default value for a <SharePoint:FormField> where the field is a Person/Group? We'd like to default a field on our newform to the ...
3
votes
3answers
2k views

JavaScript and CSOM Unable to update a new item lookup field with a string

I have a list MyUsers that has a lookup field deptRef that references the Title in my departments list. Fine and is easy for my users to update the MyUsers list and select the relevant department. ...
3
votes
1answer
110 views

Determine “normal” Users from User Collection loaded with CSOM (provider-hosted App)

In my provider-hosted app I load the UserCollection from SharePoint by CSOM (Client Side Object Model), like this: UserCollection users = web.SiteUsers; ...
3
votes
1answer
82 views

Access Denied on use of AppPrincipalManager

We are getting the following error Access denied. You do not have permission to perform this action or access this resource. when executing the following code AppPrincipalManager ap = ...
3
votes
2answers
254 views

Update available page layouts of web using CSOM

Is it possible to update the available page layouts of a web using CSOM? In the interface you can change them by going to the site setting and then to page layout and site template settings, but I ...
3
votes
2answers
561 views

Creating a SharePoint Wiki Page via JavaScript and REST or CSOM

I'm fairly new to developing SharePoint 2013 Apps, and I was tasked to customize the Create New Wiki Page for a Site. The user has to type in the Title, I do some processing, and then when everything ...
3
votes
1answer
252 views

Get Site Template ECMAScript

I have an ECMA script that I'm using to build a site directory (Thank you Bill Simser). I'm trying to add additional information such as the template the site is using, and not having much luck ...
3
votes
1answer
77 views

Background tasks/timer jobs in SharePoint O365 with Azure provider-hosted app

I am building a provider-hosted app for SharePoint (O365) which is hosted in Azure. I do all of my logic through CSOM, more specifically using an MVC web project. At the moment, I have some branding ...
3
votes
1answer
93 views

Checking CSOM people editor value

How can we check the user entered key in Client people editor is user or group? I have created a people editor in CSOM. I can save the value to the list successfully. But before saving i need to ...
3
votes
1answer
79 views

change NavigateForFormsPages value to true using CSOM

I'm searching for a way to change NavigateForFormsPages property using CSOM but no luck till now. Anyone has idea to do it using CSOM
3
votes
2answers
85 views

Sharepoint 2013 .Net CSOM search across “All Sites”

I'm creating a new ClientContext: ClientContext clientContext = new ClientContext(targetUrl); When trying to do a simple search: KeywordQuery keywordQuery = new KeywordQuery(clientContext); ...
3
votes
3answers
589 views

Query multiple lists in a provider hosted app

I'm currenlty working on a provider hosted app that is hosted in Azure. In this app I need information with multiple lists in multiple sites, which are all in the same sitecollection.I'm basically ...
3
votes
1answer
172 views

Change SiteLogo via csom in SharePoint 2013

Regarding to this Question link. How can i change the siteLogo to a new one? Is it even possible to do it from a ConsoleApplication via CSOM?
3
votes
1answer
186 views

Programatically adding an app to a site O365

Newbie question. With CSOM how to I add an app to a site. More detail: manually you can select options and then "add an app" The one in particular I am interested in is the Tasks. I can build any ...
3
votes
2answers
707 views

Accessing files in SharePoint AutoHosted App 2013

I am creating an AutoHosted App in SP 2013 and trying to access the file under one folder of the remote Web (need to pick the file from current project directory location and pass that file to another ...
3
votes
0answers
79 views

JSOM working in Chrome but not IE

I am learning the Java CSOM at the moment and have written a little program that creates a sub-site and assigns a masterpage to it. I am embedding all the code directly on the page. I am finding ...
3
votes
0answers
800 views

Check given user's listItem permissions with SharePoint 2010 Managed Client Object Model (c#)

Is it possible to determine if a user can access a given item identified by its url without the users context - it has to be done with CSOM. Code so far: var file = ...
3
votes
1answer
190 views

How to navigate between pages/controllers in SharePoint Application

I am using MVC to create SharePoint Provider Hosted App. How to create navigation menu in Share Point Application, for example if i just create hyperlink it doesn't take SPHostUrl and other query ...
3
votes
0answers
248 views

Design Package import SharePoint 2013 using App Installed event CSOM

In SP2013, I am trying to import and export the design package from one site to other site using AppInstalled event using CSOM. I am not able to get the context of source site to import the design ...
2
votes
2answers
1k views

Why does “sp.js” load only when I am editing a web part page?

I have created a page and would like to use some functions that require sp.js to be loaded, but it never seems to load unless I am editid the page (Site Actions -> Edit Page). Trying to find the ...