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

learn more… | top users | synonyms (1)

1
vote
1answer
281 views

How to stop execution after exception in ExecuteQuery

I have a remote event receiver attached to a list on my SP web and code that then runs on the ItemUpdated event: var web = clientContext.Web; var site = clientContext.Site; var list = ...
0
votes
0answers
112 views

using SharePoint COM to update list from csv file

Using SharePoint COM (using C#) I am trying to update my custom list from a CSV. In both the list and CSV file on column is common and I using that column for comparision. I am able to achieve the ...
1
vote
1answer
384 views

How to access the data from Manage User Profiles?

We are have sync the SP with AD using Active Directory Import for SharePoint 2013. All the users have been picked up into the Manage User Profiles and new user properties have been added to the ...
0
votes
1answer
44 views

problem getting date time

I am using the CSOM in javascript. I have a list which contains 3 text types and 2 date types. When I use: var listEnumerator = this.listItems.getEnumerator(); var collection = ...
0
votes
1answer
148 views

CSOM query certain date

I have a list that has an end date in. Is there anyway to filter out the dates that are passed todays date? function retrieveCurrentListProperties() { clientContext = new ...
0
votes
3answers
2k views

count items in a list javascript CSOM [duplicate]

I am wanting to count the number of items in my list. Using CSOM in javascript I have tried it but my code doesn't work. Where am I going wrong. Here is my code: var clientContext = new ...
0
votes
3answers
1k views

What is best practice to add list item in SharePoint 2013 javascript object model?

I need reference code to add an item to a list programmaticaly via javascript object model in SharePoint 2013.. Got many solutions online but not sure what js to include, whether ajax calls are need ...
2
votes
1answer
788 views

Can we access list from other site collection sites using javascript object model?

ECMAScript object model can only be used in SharePoint sites. So you can’t use this object model in an asp.net site to access SharePoint resources deployed in another url as this is cross-site ...
0
votes
0answers
32 views

Linking a js file into a blank page in sharepoint then count how many items in a list

I have created a new page on my sharepoint site. I have embedded some html using the embed code <!DOCTYPE html> <html> <body> hello </body> </html> I have a js file ...
0
votes
1answer
295 views

getting data from a list sharepoint object model CSOM javascript

I have a list which I want to get information from using javascript. It doesn't show the list just certain things like how many items in the list. I am completely new to sharepoint so don't have a ...
0
votes
2answers
761 views

How to get value of custom lookup field.?

I have code here, clientContext.load(collListItem, 'Include(Id, Fruits)'); clientContext.executeQueryAsync( Function.createDelegate(this, this.onQuerySucceeded), ...
0
votes
2answers
229 views

Can we use “ExecuteOrDelayUntilScriptLoaded” with application pages.?

Can we use ExecuteOrDelayUntilScriptLoaded in application pages. If yes, do I need to add sp.js to the project to make it work?
4
votes
3answers
1k 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
118 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
2k 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
394 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
159 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
363 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
138 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
636 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
108 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
282 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
27 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
3k 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
235 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
1answer
158 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
74 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
3answers
199 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
937 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
2k 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 ...
3
votes
1answer
1k 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
725 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
905 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 ?
-1
votes
2answers
1k 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
295 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
343 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
2answers
565 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
163 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
265 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
170 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
1k 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
32 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
181 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
136 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
1k 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
2k 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 = ...
7
votes
2answers
5k 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
565 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
477 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\' />', ...