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

learn more… | top users | synonyms (1)

2
votes
3answers
4k views

How to access the documents in using javascript in SharePoint 2013 Preview?

I try to get familiar with with the Javascript API of SharePoint 2013 (Preview). Therefore I started a SharePoint-hosted app using VS2012. The default app works just great after deploying to my local ...
0
votes
1answer
17 views

how to search document from sharepoint 2013 document library using c#

i need C# code for to search documents from SharePoint 2013 document library. i was uploaded documents in SharePoint document library now i want to search all uploaded documents by using c# coding . ...
8
votes
4answers
19k 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 ...
1
vote
1answer
403 views

Sharepoint 2013 publishing page creation using Client Object Model

I am using SharePoint 2013. Is there any way I can programmatically create a page using ONLY th Client Object Model? Also notice that the page should be editable for further use.
0
votes
1answer
458 views

Client Context executeQuery() works in console app but returns null object when executed from CRM Server

I have the function GetDocumentLibrary which must return a libray from sharepoint site. When I execute it from a Visual Studio Console Application it works and return the library with all ...
4
votes
5answers
18k views

HTTP 401, Unauthorized using the Managed Client Object Model

I have a Windows 7 system built (per MS' instructions) with SharePoint 2010 Server. I'm writing a simple console application on it that attempts to use SharePoint's Managed Client Object Model to ...
3
votes
2answers
370 views

How to parse a SharePoint URL to get CSOM objects?

Let's say the only input I have from the user is the full URL to a folder in a Document Library called "Public Documents": http://intranet.contoso.com/SubSite/PublicDocuments/Folder/SubFolder/ Using ...
0
votes
1answer
579 views

How to change 'Modified By' column value when a new file is uploaded in SharePoint 2013 using Client Object Model?

I want to change 'Modified By' column value of a file that is being uploaded using Client Object Model in SharePoint 2013. The problem is that the version of the file is changing. Kindly help me. The ...
3
votes
3answers
4k views

Why is list.GetItems pulling more fields than specified in my CamlQuery?

I am trying to pull back just specific columns in a list using the .NET client object model. (i.e. using Microsoft.SharePoint.Client;) This is the CamlQuery specifying just fields in the DefaultView ...
0
votes
0answers
17 views

Cross-Domain Calls in SharePoint - Comparism

Basic Example mysite.mysharepoint.com has clientside code that wants to access a list on mysharepoint.com due to whatever reason. the Same-origin policy forbids this Possible Workarounds SSOM ...
0
votes
2answers
578 views

Import bulk data (over 5000 List Items) into SharePoint

I have an Microsoft Office 2010 AddIn which imports Data into SharePoint. The tool creates a Dictionary with over 5000 Values. Every Value is a C#-Class with Data and represents a SharePoint List ...
-1
votes
2answers
51 views

Full control user Getting error in recyclebinitemcollection: “Access Denied” in sharepoint 2010 client object model

List spRecycleCollection = new List(); Site collSite = _ctx.Site; RecycleBinItemCollection collRBI = collSite.RecycleBin; ...
2
votes
1answer
784 views

How to open file in adobe reader using command line without checkout from Javascript?

I am working on print functionality. I am printing the PDF files (uploaded in SharePoint Library) using Adobe Reader command line from javascript. I am using ActiveX object to call the cmd. refer ...
0
votes
1answer
220 views

Anonymous Users and managed navigation

I have a custom JavaScript that builds an extra navigation menu from a Managed Navigation termset. Currently this is using JSOM and is great - when a user is logged in. The problem is anonymous ...
0
votes
1answer
378 views

Dynamically create metadata and associate it with File using Client Object Model

Is there any way to dynamically add metadata in the upload file. I am using the following code in this regard. File uploadFile = context.Web.GetFileByServerRelativeUrl(location); //check out to make ...
0
votes
1answer
20 views

Using the SharePoint 2010 CSOM to Delete a list

I am trying to delete a list that contains documents using the SharePoint 2010 CSOM and am using the following code: //find the 'Project Documents' library and delete it var list = ...
0
votes
1answer
440 views

Check-In & Checked Out files inside folder in Document library using Client Object Model

I am not able checkin/checkout the files in sub folders in the document library using client object model. Below is the code I am using. public void CheckOut()// CHECK OUT FUNCTION { try { ...
2
votes
0answers
47 views

GetUserEffectivePermissions returns wrong results

I'm checking the permissions for user on a SharePoint 2013 list: using (var ctx = new ClientContext("http://comtoso.com")) { var list = ctx.Web.Lists.GetByTitle("TestList"); ...
1
vote
2answers
403 views

Windows 8 App using COM dlls of Sharepoint gives error “Cannot resolve Assembly or Windows Metadata file 'System.Web.Services.dll'”?

I have created a sample app using Windows 8 C# XAML to get site info of SharePoint 2010 using COM Dlls. I have added reference of: C:\Program Files\Common Files\microsoft shared\SharePoint ...
0
votes
1answer
322 views

Taxonomy control in SharePoint hosted app

I am creating an SharePoint hosted app. In that I have to use Managed MataData from my list. In this I am getting the Metadata from my list column to my Taxonomy control. I have find some post but I ...
0
votes
1answer
68 views

Get List Item Version History using Client Side Object Model (C#)

I am using the Client Side Object Model Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll against SharePoint 2013, and am able to pull down data from custom lists. What I am ...
0
votes
2answers
712 views

How to get the current SharePoint client context site?

i am using C# windows application. i want to access the SharePoint site to client Om. Normally we are using, ClientContext objContext = new ClientContext("//Sharepointsite"); but my question is ...
1
vote
1answer
387 views

how to update properties of item in doc set with client object model

I've been able to create doc sets and upload files to it with the client object model. I am having difficulty updating the properties of the files in the doc sets. Here is what I've tried: public ...
0
votes
1answer
1k views

SPServices - GetRolesAndPermissionsForCurrentUser

I have a list where one group of users is not allowed to delete items but they have view and edit permissions. All items in the list contain an attachment. However, users are not allowed to delete the ...
3
votes
1answer
1k views

System.ServiceModel.ServiceActivationException “A relative URI cannot be created because the 'uriString' parameter represents an absolute”

The client object model code in my application is throwing the following exception. How to solve it?. System.ServiceModel.ServiceActivationException: The service '/_vti_bin/client.svc' cannot be ...
0
votes
0answers
22 views

How to perform Insert,update & delete operation on External Content Type by consuming the ECT operation

I am able to perform read operation on external content type using .net client object model (CSOM) but not able to find appropriate resource on Insert, update & delete. i have attached all the ...
0
votes
1answer
24 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 ...
1
vote
1answer
444 views

How to get server datetime without postback using JSOM or services

My application page may be long time without reloading, and user changed system date and time. And I need to know datetime from server, not from client.
39
votes
7answers
33k views

How do you get the current list item in JavaScript?

There's all kinds of ECMAScript class library examples around but all of the ones I find show how to retrieve all list items (through SP.ClientContent) but how do you get the current list item? I'm ...
0
votes
1answer
18 views

SharePoint 2010 Client Object Model - 401 on SubSite but not root

I am trying to use the CSOM to access data from a root site, then loop through its subsites to get into files that are stored in its lists. When I go to create the ClientContext, it works fine with ...
1
vote
2answers
4k views

How to modify user profile properties using javascript in SharePoint 2013 (Online)?

I need to modify user profile properties using javascript (REST or CSOM). How can I do that? I don't see any methods in MSDN documentation about modifying profile properties without server code. ...
0
votes
0answers
22 views

Microsoft.SharePoint.Client.ServerUnauthorizedAccessException on test server but not in dev

I am trying to save a document in Sharepoint 2013 with the following code; using (var context = new ClientContext(this.SharepointServer)) { // context.Credentials = ...
0
votes
0answers
11 views

How to upload big size file WITH VERSIONS to sharepoint 2010 using managed client object model?

I am having requirement of uploading files to sharepoint using managed client om.for that i tried the code like: byte[] vercontent = webclient.DownloadData(curverFileVerUrl); double ...
0
votes
1answer
46 views

Filter out hidden folder using client object model in sharepoint 2013

I am adding list and library in treeview but it also displaying the "Forms", "Attachements", "Item" hidden folder in treeview. Any one has any idea to hide that folder using client object model? I'm ...
0
votes
2answers
22 views

REST api Bad Request file replace

I'm using sharepoint REST api using JavaScript to replace a file in a doc library. Here is the url structure I'm using. <!-- language: lang-js --> props.webUrl + "/_api/web/lists(guid'" + ...
0
votes
1answer
118 views

Issue while adding multiple items using for loop in Client Object model

I am trying to develop My Favourite functionality in Sharepoint using the below approach. Create My Favourite list Create a custom script that will read the selection of the list item (any other ...
0
votes
1answer
467 views

502 DNS lookup failed error when using SharePoint 2013 CSOM

I am facing an issue while using CSOM in SharePoint 2013. I have configured an alternate access mapping for our site to run on http://mycustomdoamin.net/ The site is running fine and I am able to see ...
1
vote
2answers
441 views

How to create sub site context in sharepoint online using app model

I am trying to create a sub-site and some predefined lists in the existed site collection. I am successfully created the sub site in the site. But Now i want to create lists in that newly created ...
3
votes
1answer
235 views

Get Library and Folder from document guid (C#)

Information given I am using version 16.0.0.0 of the Microsoft.SharePoint.Client library. There are several different document libraries in the SharePoint site. In code, we are given a list of ...
1
vote
1answer
1k views

set multiselect lookup column using jquery

I have a Multi select Look up column which as you all know is a control with two list boxes and "Add or Remove" Buttons. The user populates the right-hand side of the control with some values by ...
0
votes
2answers
639 views

How to get display name from created by field in sharepoint client object model?

In my SharePoint JavaScript code, I am retrieving items from a list in my SP 2010 environment. I used a camel query to download specific fields. One of the fields was created by (person who created ...
8
votes
4answers
19k views

Get Site Collection full URL using javascript

I want to get the URL for my site collection. One way I thought I could do it was using the window.location in javascript and getting it that way. I know that you can use ECMA script and the client ...
0
votes
1answer
539 views

How to create a new document from a Document Template using Client Object Model

I require to programatically create a new document using the Document Template URL of the document Library and this requires to be done using the Client Object Model. I also require to do this without ...
0
votes
1answer
38 views

JSOM context newly created id reference when creating more than one item

I am using the COM JavaScript/jQuery to get, create & update some list items. I have two lists and every time I create a new item in one list, the newly created id is something that I want to grab ...
3
votes
2answers
300 views

Bug? 2010 Document Sets via Client Model shown as folder

I got a frustrating problem: When I create a document set via Client Object Model, the document set is created as intended as far as it concerns the appearance outside the treeview. It's shown as ...
0
votes
1answer
49 views

Client Object Model: How to get the credentials for windows authentication?

In my .Net application I am using Windows Authentication. I need to save a document to SharePoint, and to do this I need to use the Client Object Model with the Microsoft.Sharepoint.Client namespace. ...
1
vote
1answer
35 views

Use GroupBy on ListItemCollection using CSOM

I am trying to do a GroupBy on a bunch of items that I have retrieved using CSOM and when I try do a foreach loop to go through them I get method not supported exception. List contactsList = ...
5
votes
2answers
4k views

SharePoint 2010 ClientObjectModel : Find Item by GUID

I have a list of 6000 listitem GUIDs. I need to check if each item still exist on the Web. Previously, I was using the SPWeb.GetFile(GUID) method to check the item. But now I need to convert that ...
0
votes
3answers
622 views

get current user info using jquery ,REST and com

My goal is to get the login name and picture for the current user. I am using SharePoint 2013 Foundation. I tried three method and non of then worked correctly: This is with jQuery SPServices: ...
1
vote
2answers
400 views

How to set field type choice using csom (c#)

I have a field type: Choice (menu to choose from) which is not multichoice. How do I set a value? I have found code for multiple choice but it doesn't seem to work for single choice.