API for interacting with SharePoint from .NET, Silverlight, and JavaScript.

learn more… | top users | synonyms

2
votes
0answers
152 views

Activating a Web-scoped Feature using SharePoint 2010 CSOM fails with ArgumentException on featDefScope

I'm trying to activate a Web-scoped feature using the Client Object Model in SharePoint 2010. The code works when activating a feature in SharePoint 2013, but when run against SharePoint 2010, I get ...
3
votes
0answers
65 views

Handling concurrency in SharePoint Client Object Model

I'm currently working on an enterprise portal built completely using provider hosted apps, ECMA CSOM and .NET client object model. We are almost at the end of our development phase and we started ...
1
vote
1answer
460 views

CSOM - Incorrect Usage of Exception Handling Scope

I am trying to use ExceptionHandlingScope in a basic Managed client side crud I am getting the error - Incorrect Usage of Exception Handling Scopes namespace ConsoleApplication1 { class ...
1
vote
1answer
189 views

How to change “Who can view the membership of the group” Group Members to Everyone through csom javascript

I was wondering if it's possible to alter a setting of a group such as Who can view the membership of the group? Setting from Group Members to Everyone through CSOM or through SP's web services. ...
1
vote
2answers
119 views

How to control the order of my javascript logic in my display template?

I have created a custom item display template. In this custom item display template I try to check if the current user has contribute permissions to the item. The item is an sitecollection. If the ...
0
votes
1answer
44 views

Cascading dropdown with long texts(string)

I have a scenario where on selection of service, I am filling services description drop-down, which is working fine. But, since the description is having lengthy texts it looks really ugly. Is there ...
1
vote
2answers
207 views

Can webparts be added using the client side object model?

I have found loads of guides showing how to do this, but none if them show how to do it using the client side model. This should do what i want, but its using the server side model and not the client ...
7
votes
2answers
4k views

Get list item url javascript object model

This is such a simple question I thought that it would have been answered somewhere else (but can't find a clear answer).... How do I get the list item url using the javascript object model? I'm ...
1
vote
0answers
226 views

How Do You Edit Pages Using The Client Side Object Model?

Im using the C# CSOM object for Sharepoint 2013. I want to edit the homepage of a site so i can add some custom content to it. I want to be able to add some custom text and some web parts in the ...
0
votes
1answer
220 views

Is it possible to duplicate a subsite using the C# client side object model

I need to create a large amount of sub sites. Each one will be the exact same to support various products. I have code written already to create a subsite and add the apps to it, but its proving to ...
0
votes
0answers
56 views

Performance Optimization when loading Termsets

I have a problem with retrieving the terms of a termset in my program (which is written in VB). The termset has about 300 terms, and all of them have about 10 to 70 subterms. I wanted to integrate all ...
0
votes
0answers
45 views

How do use JS to Query and Display a Calendar View

I am customizing an intranet site with SharePoint 2013. I created a Calendar App and want to query the view and display it in a customized HTML/XML webapp that will be used with other data/content. ...
0
votes
1answer
1k views

Get sub folder from document library using SharePoint.Client.dll

I need to get the folder named Arshad from SharePoint Document library folder. The path of the sub folder is : http://url/Shared Documents/Arshad I need to access the folder using SharePoint ...
0
votes
1answer
251 views

What is the Best way to use angular with SharePoint

I'm trying to find the Best way to Build a SharePoint site(not an app) with Angular. I've multiple Content Editor webparts where I use the REST/JSOM to load content(Ex: Image Slider, List of Calendar ...
5
votes
1answer
1k views

CSOM: How to get user groups specific to a site and not all the user groups in the site collection?

I am trying to get the list of user groups specific to a site (within a site collection) but the Web.SiteGroups is returning all the user groups at the site collection level, and therefore I am unable ...
0
votes
0answers
96 views

Upload a file in Host web using SharePoint Hosted App

I'm trying to upload a file into /_catalogs/masterpage of the root site using my app. But it seems that I'm unable to access anything outside of my appWeb. uploadFileToHostWebViaCSOM = function (...
0
votes
0answers
178 views

Update SharePoint List when clicking button on InfoPath form

I have an InfoPath 2013 form that pulls information from numerous sources, including several SharePoint lists. There is a button on the form (NOT the Submit button) that does some work behind the ...
0
votes
0answers
173 views

SharePoint User Impersonation through CSOM in SharePoint/Office App

I am trying to create an Office App for Word that will have read access to a List in a SharePoint tenant. The goal is to show only the items on the list that are published and within the user's ...
1
vote
0answers
1k views

clientContext.Credentials = CredentialCache.DefaultNetworkCredentials - in CSOM returns 401 unauthorized thru IIS

I am trying to access sharepoint site using CSOM with Windows Authentication. It works if I run it in visual studio on a server. However, it returns a 401 unauthorized when I run the site thru IIS on ...
0
votes
0answers
130 views

Javascript Conflict on Visual Webpart when adding multiple times with different webpart properties on single page

What I am doing: I am retrieving list items from list using javascript as per visual webpart custom property. I have created a dropdown in webpart editor part from where I am getting site url. As per ...
0
votes
2answers
187 views

SharePoint 2010 Client Object Model code for different site - Value does not fall within the expected range

I am trying to fire some real basic CSOM calls by button clicks on an HTML form. The only problem is the form needs to be located on one site and the SP.file objects might be located on another site. ...
3
votes
1answer
651 views

How to create a list template by using CSOM?

For creating a list template programmatically by using server object, I'm using the SaveAsTemplate() function. SPSecurity.RunWithElevatedPrivileges(delegate { using (SPSite oSPsite = new SPSite(...
1
vote
1answer
69 views

Can we distribute SharePoint DLLs with our application

Is my understanding of following page correct that we can distribute Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll with our application? Like we reference these DLLs in ...
0
votes
1answer
115 views

Unable to return Microsoft.Sharepoint.Client.File object Names filtered by extension

I'm attempting to retrieve a set of File objects filtered by extension. The following code works correctly (without the filter). FolderCollection productModelFolders = _clientContext.Web.Lists....
0
votes
1answer
200 views

Getting error from display multiple selected external list item javascript

So here's the javascript I use to display item name of selected item from an external list: <script type="text/javascript"> var targetListItem; function ShowSelectedItems() { ...
0
votes
1answer
104 views

Copy SharePoint file from Http to Ftp

Is there a direct way to copy a file from a SharePoint library to an Ftp location? Currently, I'm able to download the document to a local directory using the OpenBinaryDirect method, however this ...
0
votes
1answer
153 views

Can you display all fields from a SharePoint list without writing them specifically?

Is it possible to retrieve every field value of a SharePoint List Item and display them on a web page without specifically calling them individually? I know it is possible to retrieve all the items ...
0
votes
1answer
241 views

Retrieve file version metadata with CSOM

My organization is requiring that we rewrite all of our sandbox solutions as we shift to SP 2013 as provider-hosted apps using CSOM. One of the event receivers I wrote would previously use the ...
1
vote
0answers
230 views

Check if user has access on site using client object model

Need to check if any user (provided user name) has access to site using c# client object model. It is sharepoint online site. Any suggestions/help is greatly appreciated.
0
votes
1answer
119 views

Sharepoint App: Create a list using javascript on the host web, list does not appear on site content

So here I am creating a list on a sharepoint app, the app has full control over the host web. I run the code and it does not trigger any exception, but If I check the host site contents, the list does ...
1
vote
0answers
20 views

Copy all folders in a library to another library [duplicate]

I have a Sharepoint library which is having 10 folders, i want to move those folders(along with files inside those folders) from one library to another library with in same site using CSOM**(C#)**. ...
0
votes
0answers
131 views

SharePoint online : Add a property in property bag of host web using JSOM

I am working on a simple SharePoint hosted app which has two text boxes to take input KEY and VALUE and add this to the property bag of the HOST WEB. I am able to read the existing properties from the ...
1
vote
1answer
825 views

How to get all checked out files in SharePoint client object model c#?

I need to get all checked out files from a document library. I am trying by following query. CamlQuery camlQuery = new CamlQuery(); camlQuery.ViewXml = @ "<View> <Query> ...
0
votes
1answer
333 views

Dynamic fields in SharePoint 2013 forms

I have a custom SharePoint list form where I would like to have country names(from another list) in one row with a check box in front of each row. On checking of any check box in front of country name,...
0
votes
0answers
121 views

SPService object is not loaded!

I am working on a script to fetch the user profile services and get the current logged in user. This was initially working on IE8 and not working in IE11. Now its not working in any browser, any ...
1
vote
2answers
405 views

How to use Microsoft.SharePoint.Client.File.SaveBinary method?

I want to save a file from document library to local drive. I am using the Client Object model approach model in development. The following is the code that I use: processSheet.SaveBinary(...
0
votes
0answers
46 views

update list items from one site to another site using client side object model in SharePoint

We migrated a site from lotus notes o SharePoint to different SharePoint server which is not in our control,in SharePoint site created by and modified by values are coming as current system login user,...
0
votes
1answer
66 views

List web part with option button in place of checkbox

I want to allow on a list web part a mutually exclusive selection for the items, so that I can force the user to select a single item and retrieve the item id using the SP.js JSOM. There is a problem ...
0
votes
0answers
75 views

People Picker in Client Object Model 2010

So I am trying to build an equivalent to a People Picker in Windows.Forms Application. Since 2010 does not have Web.SiteUsers like 2013 does I had to write it like this. public UserPicker(string ...
0
votes
0answers
97 views

Access denied error opening SharePoint hosted app in dialog in Internet Explorer

I am trying to make an app that opens in a new dialog but am unable to use it in Internet Explorer in a new dialog. It opens perfectly fine in a new page but I am getting an access denied error in sp....
0
votes
0answers
93 views

how to get client context in a external js file

I have a SharePoint event list where start date and end date needs to be formatted to clients time zone. I am thinking of getting the regional settings and then converting the time. I have to write ...
1
vote
0answers
31 views

select login name items from list client object model

I don't get the title, or any item in the get_Vote_onSuccess function see below the code: var ctx; var collListItem; var web; var loginUser; $(document).ready(function () { SP.SOD....
2
votes
0answers
592 views

How to retrieve webpart xml-definition programatically

I have a Custom Webpart deployed in the Site, to which I need to retrieve the XML definition programmatically using Client side object model, can anybody help? EDIT: I used the following code. ...
0
votes
1answer
287 views

How to verify feature staus (enabled/disbaled) using client object model in SharePoint online?

I am working on "Retrieving activated features of specific scope". I have written following code. ClientContext context = ContextManager.GetClientContext(cred, siteUrl); Site site = ...
0
votes
1answer
371 views

Client Object Model checking permissions on Webs

I'm currently writing a SharePoint hosted app that displays a treeview of a site collection on a site that is not the current. To do this I have an admin account that has permissions over both of ...
0
votes
0answers
589 views

Value does not fall within the expected range - CSOM

What is the reason for the below exception message in CSOM code which I received when querying for data from SharePoint Online? Value does not fall within the expected range. Code sample: public ...
1
vote
2answers
1k views

Load all fields for a specific ListItem using CSOM

I want to load all FieldValues for a specific ListItem ForExample public ListItem GetItemById(List SPList, int id, string[] fieldNames) { using (Ctx) { ...
0
votes
1answer
148 views

Get Item ID not working

I'm trying to get the ID from a SharePoint list, however I cannot obtain it. ctx_load(Include(ID)) does not seem to work. When I call items.get_id(); it returns undefined. Also, the items object is ...
1
vote
0answers
37 views

SharePoint newly created Group's description is not fetched using CSOM

I use below code to get the SharePoint Site group's data. Description of the default groups like owners, visitors were fetched correctly but the same code returns null for newly created group's ...
2
votes
1answer
905 views

Cannot contact site at the specified URL https://www.server.com:1234/sites/test/

I want to create a list item using SharePoint Client object model (SharePoint 2010). string siteURL = @"https://www.server.com:1234/sites/test/"; using (ClientContext spcontext = new ...