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

learn more… | top users | synonyms (1)

5
votes
2answers
960 views

ScriptResx.ashx Not Working

I'm trying to use ScriptResx.ashx in an Application Page I'm building (just to test out the functionality) and every time I try to grab a resource from what should be a JavaScript object, SharePoint ...
5
votes
2answers
2k views

Datetime update is one day off

I'm updating a list with a date field (just the date) using the ECMASCRIPT object model but when the date is inserted is one day off from the introduced date, It's literally making me pull my hair off ...
5
votes
1answer
1k views

JavaScript Client object model, rename folder

I am trying to rename a folder inside a Document library. Right now I get my item and everything is good but when I try to rename it using set_item('title', 'NewFolderName') it crashes and unwinds the ...
5
votes
2answers
3k views

How to disable a ribbon button when a folder is selected

I have added a new button to the SharePoint ribbon for document libraries. This all works well and the button is enabled / disabled depending on the number of items selected... fine! I want to ...
5
votes
3answers
1k views

Create a new wiki page using the 2013 Client Library

I'm using the SharePoint 2013 Client Library and am trying to generate new wiki articles. I'm able to connect, retrieve the web, find the list, but I can't add items. I feel like I need to be using ...
5
votes
1answer
535 views

Performance of SharePoint 2010 Managed Client Object Model

Is there any published information (by the community or Microsoft) about performance of the new web service based Managed Client Object Model versus the pre-2010 object model?
5
votes
1answer
735 views

Sharepoint Client context (client Object Model) cant load more than 500 records or more

is here any limitation about read the records from any lists in sharepoint? my codes are default that downloaded from msdn: string siteUrl = SharePointAddressURL; ClientContext ...
5
votes
1answer
153 views

SharePoint Client Object Model not returning hidden folders in document library

I am using the SharePoint Client Object Model to get information from a SharePoint 2010 document library to be able to delete old htm-files located there. The problem is that these htm-files have ...
5
votes
2answers
955 views

Client Object Model Authentication - Authenticating the Wrong account!

I am using the Client Object Model to interface my .NET App with SP 2010. What I am finding curious is that I am using default authentication, and whenever I make my connection, I am ending up ...
4
votes
4answers
5k views

Multiple Values in CAML query from Array? SharePoint 2010 using jQuery/SPServices

So if I use SPServices to GetListItems with CAMLQuery, is it possible to insert multiple values inside Value Type='Number'> here I would like to evaluate things throught a flow in my page, add to an ...
4
votes
3answers
3k views

SharePoint 2013 Call the REST API from SharePoint hosted app

I've successfully deployed a SharePoint hosted app to office 365 and my local on premise installation. All the app aims to do is call the REST API for the user profile manager to get the profile ...
4
votes
2answers
3k views

Attach a Javascript function to an OOTB ribbon button

I want to attach a custom javascript function to the out of the box "Download a copy" ribbon button. This is to provide analytics for file downloads done through the ribbon button. I tried this ...
4
votes
2answers
6k views

How to retrieve lookup values using ClientContext?

What's the best way to retrieve lookup values using ClientContext? I'm accessing a list using ClientContext (let's call it ParentList). That list contains several lookup fields (let's call one of them ...
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 ...
4
votes
2answers
1k views

SP JSOM: is there any way to get the group by name instead of getById(10)

is there a way I can use the below with something like getByName(thisGroup), instead of getById(10) in SP 2010 jsom: function setSomeUsers(dataObj, projGroup) { var clientContext = new ...
4
votes
2answers
482 views

Can you call SPSite on a different machine to SharePoint setup?

I'm trying to call SharePoint from within a standard .NET class library. This will probably be hosted on a different server to SharePoint. I just need to return an item from a list, and wondered if I ...
4
votes
5answers
15k 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 ...
4
votes
2answers
2k views

SP2010 REST API from Javascript: how to set multiple fields to filter on in the URL

weird but i can't figure this out or find a solution anywhere.... I want to filter on two values on a GET in REST URL from javascript. So since this is from ECMA I am just using filtering in the ...
4
votes
1answer
2k views

no sorting with JavaScript Client Object Model?

I have the following JSOM code: var query = "<View><Query><Where><Eq><FieldRef Name='Category'/><Value ...
4
votes
1answer
7k views

How to get all fields of a list using JS Client Object Model

Is it possible to retrieve all fields of a list (or default view) through the JavaScript Client Object Model and filter the fields on type (e.g. I only want the Choice fields). var clientContext ...
4
votes
1answer
2k views

Document Sets and Client Object Model

What are the options to manage documents sets using Client Object Model? I need to create new document sets and upload some files in them...
4
votes
1answer
721 views

Error using javascript to retrieve a SharePoint list's items

I am trying to use this method to query items of a column of a list in my SP site via javascript (the reason I am doing this is to display that info on the page by modifying the html tags in the DOM), ...
4
votes
3answers
5k views

PowerShell and the client object model: “The collection has not been initialized”

I'm trying to grant a user permission to a SharePoint site using PowerShell and the client object model. The code I'm using is as follows: # Setup context $context=New-Object ...
4
votes
2answers
3k views

Managed Metadata and the client OM

Is it possible to return the values of a Managed Metadata field assigned to a document using strictly the client object model? Note that I want to return ALL the possible values and allow the user ...
4
votes
4answers
9k views

Closing a modal dialog using a custom form

I am using some JavaScript (Client OM) code to open a dialog. Here's a snippet: function OpenModalForm() { //snip var opt = { url: url, width: 800, height: 600, ...
4
votes
2answers
3k views

Changing the SP.UI.Notify notification color

Does anybody know how to change the color of the notification popup displayed by the SharePoint 2010 client object model for Javascript? The following always gives me a green popup: ...
4
votes
2answers
2k views

How to read a column type SPUser, DateTime, Currency with EcmaScript?

I have a list in SharePoint 2010 with some columns. All are default types. So I have "Single line of text" "Multiple line of text" "Date and Time" "Choice" "Number" "Currency" "Person or Group" ...
4
votes
2answers
224 views

Is there a way to determine if the SharePoint version is 2007 or 2010 using Managed Client Object Model?

I am building an application that interacts with SharePoint 2010. It is a Silverlight application built on the Managed Client Object Model. The application is set up on SharePoint like this: User ...
4
votes
2answers
335 views

Dialog Framework References

One of the new features in SP 2010 is the dialog framework, so that the user is presented with a uniform UI. What are the best references or tutorials you've seen about this feature? So far, this is ...
4
votes
1answer
221 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 ...
4
votes
2answers
3k views

Format Date using Javascript Object Model

I am using the javascript object model to get a date field back and display it on a page e.g. oListItem.get_item("MyTestDate") This displays on the page by default as: Thu Jul 25 09:30:07 PDT 2013 I ...
4
votes
1answer
1k views

Updating “Editor” or “Modified By” without changing timestamp

We changed domains and I need to updated the User fields in all lists and libraries to reflect the new domain accounts. (I know that stsadm.exe -o migrateuser will mostly handle this but since it ...
4
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 ...
4
votes
2answers
3k views

Remove “Add new item” functionality from lists

I have lists where the items are created from nintex workflows. I need to prevent the users from adding list items manually, as the workflows ensure dependencies. Revoking the add item permission is ...
4
votes
1answer
2k views

How to find the Author Name using SP Client Context in SharePoint 2010?

I am trying to find the Author Name(created by) for a given Item Id using the SP Client context in SharePoint 2010. Below the code snippet var ctx = new SP.ClientContext.get_current(); ...
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 = ...
4
votes
2answers
557 views

Programatically setting Site Collections Administrators in SharePoint 2010 using Client Object Model

I am writing a program where I want to be able to add/remove user/groups as administrator for a given Site Collection. I am using Client Object Model API for SharePoint 2010. I havent been able to ...
4
votes
2answers
181 views

Is it possible to Fire event when Content type added in Shared Documents in sharepoint 2010?

How to fire event when any content type added in shared document library ? How to handle this event ?
4
votes
3answers
4k views

How to get SP.Folder for SP.ListItem in SharePoint 2010 JavaScript Client Object Model?

I have a custom button on ribbon for document library and need to disable it if current SPListItem is an empty folder. To disable button I use EnabledScript attribute of CommandUIHandler. I can get ...
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 ...
4
votes
3answers
912 views

Commit modal dialog and then display notification

I have a modal dialog that I commit by calling window.frameElement.commitPopup(), and this is great because it refreshes the parent window. However I would also like to display a notification on the ...
4
votes
1answer
2k views

Get TaxonomySession TermStore TermSet Term from Sharepoint 2010 Server using Microsoft.Sharepoint.Client.Taxonomy.dll

I'm coding a c++/c# client-application to communicate with a Sharepoint 2010 site which uses Taxonomy I have downloaded and installed Microsoft.Sharepoint.Client.Taxonomy.dll from: ...
4
votes
2answers
3k views

Copy file using javascript client object model - new version

I have a solution that adds a custom button to the ribbon in SharePoint 2010 and am using the javascript client object model behind the scenes to copy a file from Library A to Library B when the ...
4
votes
1answer
834 views

How to add rich text content programmatically using Managed Client Object Model?

I am building a Silverlight application that interacts with SharePoint through Managed Client Object Model. One of the functionalities of the app is to update a list item field with rich text content. ...
4
votes
1answer
122 views

TaxonomyClientService GetTermSets - Error The maximum string content length quota (65535) has been exceeded while reading XML data

I'm using the TaxonomyClientService to retrieve the TermSets using the GetTermSets call, the code works fine except one of the result is getting big and I'm receiving this error The maximum string ...
3
votes
2answers
1k views

How to enable publishing feature using CSOM?

How to enable site collection publishing infrastructure and site publishing features using CSOM?
3
votes
2answers
2k views

Can I use the SharePoint 2010 Client Object Model with Sharepoint 2007?

Any workarounds or alternatives that work on both SP2010 & 2007. http://www.microsoft.com/downloads/en/details.aspx?FamilyID=b4579045-b183-4ed4-bf61-dc2f0deabe47
3
votes
3answers
3k views

How to use “SPContext.Current.Web.Url” in client object model?

When working with server side code we can use the following line to obtain the url of the current web site: var url = SPContext.Current.Web.Url; How can we do the same when working with the client ...
3
votes
5answers
3k views

SP.ClientContext is always “undefined” in JSLink functions

I'm trying to execute CSOM functions as part of a JSLink extension to override rendering of a Lookup Field. Problem is every time I try to access SP.ClientContext it returns as undefined I have ...
3
votes
3answers
7k views

Get User via JavaScript Client Object Model

Is there a way to get user information via the JavaScript Client OM? Something similar to the clientContext.Web.EnsureUser(userName) method. I am aware that there is the SPService JQuery library, but ...