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

learn more… | top users | synonyms (1)

4
votes
3answers
496 views

Is there a way to get Folder object from ListItem one?

This is my first post, so I'd like to say hello to everyone. I'm trying to get Folder object by its path in SharePoint 2010 client application using Client Side Object Model (.Net 4.0). I need to ...
0
votes
0answers
98 views

Get a document thumbnail URL using client object model on SharePoint Online

I am working in a SharePoint online based environment and I need to fetch the thumbnail url for a document in a library programmatically, using the .Net client object model (not EcmaScript). Is that ...
2
votes
3answers
1k views

using CSOM to retrieve fields in a list in a view

I am trying to use the CSOM to retrieve all the displayed fields in a particular view. I require to know the field type and field internal name. I can not do: var list = ...
4
votes
1answer
222 views

How can I read Secure Store Credentials using the Client Object Model?

I got an high trusted provider hosted application that use the App Only Policy. If I try to use server object model, sharepoint returns a context error. Is it possible to use the client object model ...
1
vote
1answer
90 views

Looking to retrieve user's groups in SharePoint

I am running SharePoint Foundation 2010. I have a claims based site setup to use a trusted token provider. I am passing it a set of claims that determine the user's group. They look similar to this: ...
4
votes
1answer
238 views

What would cause CSOM.GetSubWebsForCurrentUser to return Access Denied

When using the CSOM Microsoft.SharePoint.Client.Web.GetSubWebsForCurrentUser returns a 'security trimmed' collection of all sub webs that the current user has access to. e.g. string currentWeb = ...
0
votes
1answer
107 views

get items in specific summary task folder in SharePoint 2010 via client object model in c# [duplicate]

i want to get items in android via web api web service. when user click on items web api return values step by step from sharepoint task list. using (ClientContext context = new ...
1
vote
1answer
361 views

ECMAScript moveTo move document to another web in same site

I have studied and used the following post to attempt to move a document: moveTo and moving documents from one library to another This works perfectly when moving documents to different libraries in ...
3
votes
1answer
103 views

How to check whether Content Database is read-only or not?

How to check whether Content Database is read-only or not using client context ? we can easily get using server object model but how to do this with Client Object Model
0
votes
0answers
17 views

SharePoint 2013 - disposing SP.ClientContext in JavaScript [duplicate]

I'm little bit confused about JS's COM in SharePoint 2013 and disposing ClientContext object. As far as I can see from earlier versions of SP (2010 mainly) you had to dispose ClientContext and ...
2
votes
1answer
246 views

How to Pass parameters from Javascript Client Object Model to Report Viewer Web Part?

I have some SQL Server Reporting Services (SSRS) reports that take parameters. I am displaying these reports via the SSRS Report Viewer Web part on a site page. I have the parameters that are needed ...
0
votes
0answers
26 views

How to access another web, by name in client object model

Iam in site B . There is another site named A .I want to access a list A of site A from site B using client object model. Can I access it I am using below code. var context = new ...
0
votes
1answer
2k 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 ...
1
vote
2answers
141 views

Error while adding a Calculated column to a list using Client Object Model

I am trying to add some fields to list using the client object model. Everything is working except the Calculated field. Every time SharePoint gives the error: An error occurred while parsing ...
1
vote
0answers
134 views

Enterprise Keyword not updating in SharePoint 2010 using client object model

Tried the following, it didn't give any error, but that column wouldn't update, while the Title did. please help me to resolve this problem using (Microsoft.SharePoint.Client.ClientContext ...
2
votes
1answer
68 views

Detect Authentication Type using Client Object Model

Is there a way of detecting the type of authentication used by SharePoint from the client browser? Edit It doesn't have to be via the Client Object Model. If there is a SharePoint JS parameter that ...
2
votes
1answer
107 views

SPWeb.AlternateCSSUrl equivalent Client Side Object Model

Does someone know the equivalent of SPWeb.AlternateCssUrl in the client side object model? Thanks
1
vote
1answer
519 views

Not able to fetch Term store and related terms using client object model

I want to fetch termstore, Termsets and related terms.However, Iam not even able to fetch the termstore. Below is the error message. TypeError: termStores is undefined termStoresEnum = ...
3
votes
3answers
1k views

How to find the current folder through JS COM?

Is there a way to get a reference to the current folder through the JS COM? It doesn't seem as though it can be done with SP.ListOperation. And by current folder, I mean the folder the user is ...
1
vote
1answer
540 views

Syntax for including fields dynamically in CSOM query?

What is the proper syntax for including fields dynamically in a CSOM listitems query? For example, this would apparently work: foreach (string field in fields) { clientContext.Load(items, includes ...
2
votes
1answer
395 views

Programmatically trigger “New document” action in a document library

I've been asked to check if it is possible to trigger the creation of a new document linked to a content type. Like, to make it simple, you have a webpart, a button, you click it, and it opens the ...
0
votes
1answer
526 views

Client Object Model to Retrieve UserProfileAttribute

we can get directly user information by using Server object but how to get this by using Client object model ?
0
votes
2answers
691 views

List of Sites and Subsites in the Given URL

How do I convert this into Client Object Model, please. I have no full SP installed on the Machine. I just need the list of sites and subsites in the Given URL.. public List<String> ...
0
votes
1answer
197 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 ...
1
vote
1answer
224 views

How to get root of variations by client OM (JS)?

Let say I have sub-sites on my "main site" (which is not root of site collection), like Home sub-site, About, Contact. The "main site" is actually language variation of another site. In another words ...
0
votes
1answer
343 views

Cascading lists drop-downs in SharePoint Designer (no server-side code) without postback

I've created cascading drop downs populated from SharePoint lists, by following this post by Lars in SharePoint designer without using code, it works fine, my issue is that the secondary drop down ...
0
votes
1answer
107 views

CSOM Form based authentication Security issue

I'm new in sharepoint development, I was looking for authenticating users via CSOM by using forms based authentication and I found below code. ClientContext ctx = new ...
1
vote
1answer
216 views

How to get url of file after uploading to document library?

How do you return the URL of a file after it has been uploaded to a document library, using the default upload page? Returning the text from the "inputFile" textbox from the upload.aspx page would ...
1
vote
1answer
135 views

SP2010 Javascript Object Model: programmactially add calculated column to list

I am building lists and adding fields via the following. I am wondering if I can add a calculated field and how you set the formula in this (or another method): function onCreateRootCause() { var ...
2
votes
1answer
873 views

client side people picker validation

I've built my people picker using the normal method for client side: // Render and initialize the client-side People Picker function initializePeoplePicker(peoplePickerElementId) { // Create a ...
0
votes
0answers
27 views

How to get “Shared With” count of a list item or document using CSOM

Is there any way to get the count of "Shares" on a list item. I've a requirement to show "share" link along with the share count like "share(10)", Can I do it using javascript?
3
votes
0answers
135 views

Is it possible to retrive CRM online data from SharePoint Online using javascript? [closed]

So I would like to get data from Microsoft Dynamics CRM 2013 Online into my SharePoint Online SharePoint Hosted App. Is this possible to javascript only? Can I use the same Cross Origin Query ...
0
votes
1answer
97 views

SP2010 JSOM: when creating field using javascript, how to define date only instead of date & time

I create a list using: function createProjectList() { var clientContext = new SP.ClientContext.get_current(); var oWebsite = clientContext.get_web(); var listCreationInfo = new ...
2
votes
1answer
750 views

Get ContentType Name in Client ObjectModel GetItems call

I'm using the SharePoint 2010 Managed Client Object Model to retrieve a list of listitems: string formattedDate = theDate.ToString("yyyy-MM-ddTHH:mm:ssZ"); CamlQuery absenceQuery = ...
2
votes
4answers
1k views

How to retrieve data from one executeQueryAsync and use it in another executeQueryAsync within the same ClientContext

I want to add item to list where Title is equal to current user ID by JavaScript Object Model. As far as I know I first need to get currentUserID and I wrote the following code currentUser = ...
5
votes
1answer
3k views

Check if user is in a specified group

I would like to check with JavaScript if the current logged user is in a specified and specific group (for example called "Admins Group"). How can I do? Thanks
4
votes
1answer
386 views

Can i use sharepoint 2013 client object model for SP 2010

I am working on a product. Our product is built on top of .NET framework 4.5. We use Sharepoint client object model (v14.0.0.0) for communicating with Sharepoint (both SP 2010 and SP 2013). This works ...
3
votes
2answers
297 views

How do I programatically change the default value of, or remove from default view, title column using javascript?

Using the JSOM in SharePoint 2010, if I am creating lists programmatically using something like: this.myField= oList.get_fields().addFieldAsXml('<Field DisplayName=\'Key\' Type=\'Text\' />', ...
1
vote
1answer
1k views

Retrieve Iist Item column values with column names on Item click, JavaScript

I need to retrieve List item column values with column names on item click. In SP2010, I have a XSL which calls the JavaScript. I have sent the list item id through the XSL into the JavaScript ...
0
votes
0answers
28 views

set properties for ShimFileCreationInformation object

I am writing some unit test cases using fakes framework. I am using an object ShimFileCreationInformation from Microsoft.SharePoint.Client.Fakes namespace. Now, I pass this object to a function. ...
2
votes
2answers
442 views

How do I get a collection of document libraries using Javascript CSOM?

I'm working on an UI feature for my SP2010 site and would like to display a number indicating how many documents were added to a specific library since the users last visit. The UI will display a box ...
0
votes
0answers
103 views

Filter/compare two arrays from CAML query

I'm using JavaScript/Client Object Model to retreive some data by CAML query. I've 2 CAML queries. One retrieve all data from a specified column. The other query retrieve data from same column ...
0
votes
1answer
55 views

Issue when getting library GUID through JavaScript

I'm using SharePoint 2010. I need to get some SharePoint data on a list item hyperlink click. Inside the JavaScript file there is a method getLibraryGuid() I get the targetLibrary value with no issues ...
3
votes
2answers
273 views

Sharepoint unit testing using fakes framework

I have an application which uploads a file to SharePoint via client object model. Now I need to write unit test cases for this application. The problem is, I how do I write test cases for the ...
2
votes
1answer
744 views

SharepointOnlineCredentials not working in an app

I want to authenticate against sharepoint online site using SharepointOnlineCredentials class. Below code works fine in a console application. But the same code is generating error when written in wcf ...
3
votes
2answers
622 views

View custom field property value using JavaScript

I'm using SharePoint 2010. Need to retrieve the Custom field property values using a JavaScript. [Trying to do this during item click in the SharePoint list item view. I call the JavaScript on the ...
1
vote
1answer
466 views

How to use JavaScript to get form data, and add it to a list

Obviously it is possible to gather data from a form using JavaScript. Microsoft also claims that is possible to add items to a custom list using JavaScript, although I have not gotten that to work. My ...
0
votes
1answer
179 views

Equivalent of GetRolesAndPermissionsForCurrentUser in SharePoint REST API?

I have this code which is used to check if a user has permissions to access the site or not. jQuery.support.cors = true; $().SPServices({ webURL: sites[index], ...
3
votes
3answers
4k 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 ...
0
votes
2answers
1k views

Grant Permissions to List Items using existing SharePoint Group using Client Object Model

I have found examples on how to add users to SharePoint Groups using Client Object Model. Can anyone help provide an example on how to grant permissions to items in a List using an existing ...