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

learn more… | top users | synonyms

6
votes
1answer
11k views

Properties when uploading Files using REST in SP 2013

After a lot of research I finally got uploads via REST working in SharePoint 2013. But I would like to provide additional properties to the Add Function like Title. This code works so far but the only ...
0
votes
0answers
82 views

Copy list item value to another in SharePoint using REST API

I am trying to auto increment a value for a specific column in SharePoint list. How to copy list item ID value to another column of of a SharePoint list (e.g ProjectID). I tried this code '...
5
votes
3answers
3k views

How to get caml query to return list items created by the current user?

I want a caml query that only retrieves items created by the user currently logged in. I tried this specifier = "<Eq><FieldRef Name='AssignedTo'/><Value Type='Integer'><UserID/&...
13
votes
6answers
19k views

List API get all items limited to 100 rows

When doing a GET call to the List API from JavaScript: "/_api/web/lists/GetByTitle('ListName')/items" the results returned are limited to 100 rows. Is there any way to return more rows in the result, ...
0
votes
1answer
38 views

How to edit SharePoint page content/URL using client Object Model

I have SharePoint Site on SharePoint online with Pages library having 5 pages with content. Need to modify the URL in the pages programmatically using Client Object Model suppose I have Newname.aspx ...
-2
votes
3answers
1k views

Why not use Sharepoint 2013 as just a backend for REST / CSOM clients?

This might sound a bit extreme, but now that REST / CSOM API's are more fully featured, why not just write web apps in whatever framework you're comfortable with and utilize the REST / CSOM API's ...
0
votes
2answers
163 views

CSOM Client Context Error

I am writing some javascript just to retrieve some simple properties. I have added a script editor webpart to the page and added simple javascript to makesure I can access the client context of the ...
-1
votes
2answers
67 views

executeQueryAsync function calling not working using for loop

I am having values in result[15452,33616] when using for loop ,the async function taking only last array value (e.g-33616) and fetching the data for that pushing to another array and final push into ...
6
votes
2answers
6k views

How to get file or list item icon in SharePoint 2013 using javascript

My requirement is i have to display files from document library with images using javascript object model or spservices. pls let me now is there a way.
1
vote
1answer
47 views

Empty CAML Query recursively search through document sets

I want to search for every single item within a document library. This is working just fine, but isn't working if the files within a document set in that library. I'm using an empty CAML query ...
0
votes
1answer
41 views

Setting value of lookup Field

Every article about how to do this is slightly different and can't seem to figure this out. I have two lookup fields which are both present on my Listitem. I have reference to the list item here. ...
1
vote
2answers
69 views

Select 5 items with caml beginning at the fifth row

I can get the 5 first items of a list with caml : var collListItemToBeUpdated = ""; var listItemToBeUpdated = ""; var enumerator; function getItemsToBeUpdated2() //this function ...
9
votes
5answers
39k views

Get Items Under Folder CAML

I am trying to retrive all items that are under a certin folder, in a document library. this is what i have so far List DocumentsList = clientContext.Web.Lists.GetByTitle(list); CamlQuery camlQuery ...
2
votes
2answers
2k views

Version Conflict issue with JavaScript Client Object Model code

I'm running into an issue where I'm trying to modify a metadata field on a document within a document library. My code, will check out the document, update the metadata field and then check in the ...
0
votes
1answer
69 views

camlQuery rowlimit not working on a list

I'm trying to update some elements in a list with client object and caml query. It's working, my values are updated, but for all the items (around 15) even I have a rowlimit of 5 : var ...
1
vote
3answers
765 views

Get all sharepoint sites in a site collection to which user has access using Javascript client object model

I want to display all sites in a site collection using JSOM to which user has access to. In other words I only need to find collection of sites to which user has access in a site collection. I am able ...
0
votes
1answer
62 views

Attach document in custom list item using Client Object Model?

How to attach file in specific Custom list item in SharePoint online using Client Object model? Any help is appreciated! Thanks!
0
votes
0answers
42 views

Update XsltListViewWebPart using client object model (JS)

I'm deploying SharePoint App model (SharePoint Hosted), how to update a list view webparts on page and using Client Object Model (JS) or another way without server side?
1
vote
1answer
52 views

How to edit SharePoint page using client Object Model

I have SharePoint Site on SharePoint online with Pages library having 5 pages with content. Need to modify the URL on the pages programmatically using Client Object Model
2
votes
1answer
1k views

Client Object Model & CAML -> Getting Items of a specific view

I need some support as I am struggling to understand what is wrong with my code. I try to retrieve the data of a specific view. The line camlQuery.ViewXml = view.ViewQuery; throws an exception The ...
2
votes
1answer
401 views

SP2010 JSOM: error when trying to get all users of specific group using javascript

having trouble getting users return from specified group using javascript per this on MSDN var siteUrl = '/sites/MySiteCollection '; function retrieveAllUsersInGroup() { var clientContext = new ...
1
vote
0answers
107 views

Get the last rated item in a SharePoint list

we have a SharePoint list with social rating feature enabled. On the homepage I want to display the "Latest Voted Item" of that list. Is it possible to get the last rated items in a SharePoint list (...
2
votes
1answer
934 views

Error handling ClientContext CSOM SharePoint Online

What is the best way to handle errors for ClientContext is there a reference material for errors thrown. When using the HTTPWebRequest you can check the status ie 403, 500. is there anything similar ...
0
votes
3answers
52 views

How to restrict date(Created) field to display only date and time?

How to restrict the date field(Created) to show only date and time instead of Fri Apr 15 2016 16:06:04 GMT+0530 (India Standard Time)? I do not want to show GMT and so on. The below is my code. ...
0
votes
0answers
16 views

Taxonomy Value Format with WSSID

I really wanted to know what is the use and effect of wssid. I m creating content organizer rule with taxonomy column. Currently, In TaxonomyHiddenList of my site is blank as i have not use any term ...
1
vote
1answer
598 views

Get inner content of Content editor web part Programatically using CSOM C#

I need to Access Web parts Content Property but it is not available in Web Part Properties when I tried with Client side object model C#. Please find below reference links for detail information. ...
0
votes
1answer
168 views

Add navigation bar heading with CSOM

How can I replicate the "Add heading" functionality of the left quick launch bar with the client side object model? The task looks simple. Update the left bar of several sites by with a few links ...
6
votes
2answers
5k views

moveTo and moving documents from one library to another

I have followed and successfully implemented the excellent article: SharePoint 2010 ECMAscript – Copy\Move files to another document library – Part 2 located at: http://www.learningsharepoint.com/...
0
votes
0answers
19 views

2010 Client Object model: Forms Authentication- 401 Unauthorized

I am using Client Object model for the forms authentication web application and I am getting 401 unauthorized error. Tried with CredentialCache.DefaultCredentials but still no use. Please help ...
4
votes
1answer
153 views

Differing ways to make executeQueryAsync calls (Function.createDelegate)

I want some understanding on two programming patterns I've seen and when to employ them. The question is about callbacks and delegate. In the first code there are two distinct functions, success ...
0
votes
0answers
27 views

Get Document Views from Client Side

We have a SharePoint 2013 intranet site that contains a Document List. There are .xlsx documents and .rdl documents. I want to know which users viewed which documents. I want to get this information ...
1
vote
0answers
39 views

Windows Phone 8: SharePoint Online Authentication via ADFS

I'm trying to develop a Windows Phone app using Windows Phone 8.1 SDK and Microsoft SharePoint SDK for Windows Phone 8. I was able to successfully authenticate against a normal SharePoint Online site ...
1
vote
1answer
96 views

client-side REST API call across domain (site collection) [duplicate]

I am trying to use my javascript to make a call to a list that lives in a separate site collection. It is not working and blocks me due to CORS. Is there any way around this? My question is different....
1
vote
0answers
25 views

2013 CSOM development-accessing List directly as user doesn't have permission to access teamsite

I want to perform CRUD to a list from a console app or Asp .NET website. I am granted access to the list, but not the team site: accessing this https://mycompany.sharepoint.com/teams/teamname/a/b/...
6
votes
3answers
702 views

Get Parent web of a subsite using JSOM in SharePoint 2013

How can we get an immediate parent web of a subsite using JSOM ?
1
vote
2answers
126 views

Client Object Model RoleDefinitionBindingCollection.Remove not working

I'm using the Client Object Model and trying to remove a specific RoleDefinition from a RoleDefinitionBindingCollection in a RoleAssignment. This is the code I'm using: Web web = context.Web;...
0
votes
1answer
38 views

Sequential ExecuteQueryAsync?

How do you properly code / process 2 ExecuteQueryAsync, with the 2nd one reliant on the items of the 1st one. Basically, I have 2 Lists. 1st List is Main List, and 2nd one is like an extension. 2nd ...
1
vote
2answers
127 views

Copy Taxonomy Field from one item to another

I use CSOM and I want to copy a taxonomy field from one list item to another. Can someone give me an example of this?
0
votes
1answer
39 views

Share multiple files of Document Library programatically

I want to share multiple files from Document Library programatically or any other way using Client Object model or REST API. Thanks.
0
votes
0answers
121 views

Cannot update custom metadata column for document Sharepoint 2010 using client object model

I'm using Sharepoint 2010 Client Object model from my C# ASP.Net application to upload documents. I have a custom column defined in Library settings for the document library. In my C# application, I'm ...
15
votes
5answers
46k views

How to get a file using SharePoint Client Object Model with only an absolute url at hand?

We have a database with absolute (full) links to SharePoint files. If a user wants to download or get checkoutstatus information about the file, our program needs lookup that information in SharePoint....
1
vote
1answer
97 views

Migrating SP2010 List Items to Office 365 creates empty items in O365 [CSOM]

I am trying to migrate SharePoint 2010 list items to an O365 list. But when the code is executed, it creates empty list items in O365 list even though "newItem" has the correct key value pair. Here "...
2
votes
1answer
4k views

Reading web part properties using JavaScript Object Model in SharePoint 2013

I am using the below code to read the properties of a web-part using JSOM. While i can read the properties of the web-parts that are there on the current web part page, I would like to know of a way ...
1
vote
1answer
8k views

How to get the managed metadata column value in a list client object model

I am trying to get values from a list for different columns like Title ,ID ,Region Where Region is a metadata column . I am able to get all the values except metadata column values . Pleas tell me ...
3
votes
1answer
1k views

Sharepoint 2010 CSOM Get user and his groups by login name

I want to get a user and all his groups by a login name. Easy to do in Sharepoint 2013. clientContext.Load(site, l => l.RootWeb.SiteUsers, l => l.RootWeb.Id, l => l.Id); ...
1
vote
0answers
17 views

Root list lookup is not assigned properly in sub site list using client object model

I have one list Users on root site. and another list I'm creating using client object model in sub site. Users list is already created. I'm try to add Users list reference in sub site list but is ...
0
votes
1answer
264 views

SP2013 App icon not rendered, only App link is displayed + how we can set the sliding transparent hover text over App icon?

I am facing an App Icon related issue. I am creating SharePoint Hosted App which I am deploying to SP 2013 Developer site. By default any app will have the AppIcon set under Images folder. Also it is ...
1
vote
2answers
433 views

How do I connect to a specific site collection using CSOM and SharePoint Online

I cannot find anywhere to specify what site to connect to when creating a new app for SharePoint online. It seems to default to https://mysite.sharepoint.com, however, I want to retrieve lists from ...
-1
votes
2answers
421 views
0
votes
3answers
660 views

Client object model connect to site with different authentication enabled?

I have a site at SharePoint on-Premises which has both Form based authentication and windows authentication enabled. Users can login using either of them. Now, I try to use Client Object Model for an ...