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

learn more… | top users | synonyms (1)

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 ...
1
vote
1answer
121 views

Client Object Model and 32 bit

While trying out Client Object Model, I was wondering whether will there be any issues if the 'Platform Target' is NOT set to 64 bit? I tried setting the value to 32 bit, even then the application was ...
0
votes
1answer
426 views

Is there a way to get the currently logged user’s colleague list using ECMA client script?

Is there a way to get the currently logged user’s colleague list using ECMA client script? Used the below script to pull the currently logged user name: <script ...
0
votes
1answer
254 views

Using Client OM from an Windows Auth ASP.Net application

I have an asp.net application and a SharePoint application which uses windows authentication and are on the same domain. From the asp.net application, I am making some managed client OM calls to the ...
1
vote
2answers
258 views

External Data: Better to Import into SP Lists or Access Externally?

I have been tasked with creating a report in Sharepoint to display data compiled from multiple external databases. From my experience thus far it seems that a Visual WebPart is the way to go to ...
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(); ...
3
votes
2answers
2k views

Client OM - setting lookup fails

I'm using client object model to migrate data from some external data source. The problem is that when I set lookup (normal list or user) I get: Value does not fall within the expected range. I set ...
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
5
votes
6answers
9k views

How do I determine a user's SharePoint group membership using the client object model?

I want to redirect users from a landing page to another page in SharePoint 2010, based on their group membership. I need to do this using JavaScript (ECMAScript) and not server side code.
30
votes
9answers
13k views

How do I know if the page is in Edit Mode from JavaScript?

Is there a way to find out if a page is in Edit Mode from JavaScript? I know in on the server-side can be found using SPContext.Current.FormContext.FormMode but I can't find any means of doing it ...
2
votes
1answer
1k views

Document versioning - different doc types

I have a document library with versioning enabled. Documents are now in some other system and I need to migrate them. The problem is thath different verions migth have diffrente file types (doc, docx, ...
2
votes
3answers
2k views

Uploading file version - Client Object Model

I have a library with versioned files. I have versioned files prepared for uploading (1 version = 1 file). How do I create new version? Do I just set file's Content property and Update it? Please ...
2
votes
2answers
1k views

How do I test if I will be able to execute a query (does the site exist)

When I run a (CAML based query) executeQuery against Sharepoint, sometimes the site does not exist (it is created by a workflow process which may not have run). When this happens, I get a ...
5
votes
2answers
764 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 ...
5
votes
5answers
1k views

When I execute a CAML query, how do I know what ListItem details I can include?

I was querying a SharePoint library, trying to retrieve some file attributes. Apparently some things like FileType and Date are not supported, even though those fields are listed as a built in field. ...
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...
34
votes
6answers
25k 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
2answers
619 views

fill a dropdown with data from a list using client object model

how can i fill a sharepoint 2010 dropdown with data from a list using client object model? i am trying to create an aspx workflow association form and want the initiator to choose an option from an ...
2
votes
1answer
2k views

SharePoint 2010 set a custom page as home page through a feature

I have a WebTemplate using a team site as BaseTemplate, and was wondring how I could set the default page as home page instead of the home.aspx page and this during the provisioning process of the ...
0
votes
1answer
228 views

accessing wssid and the guid of managed meta data using silverlight

I am making a silverlight UI to allow users to enter information into a list. I want give the users a choice of metadata to enter into the list, but in order to enter the metadata into the list, I ...
4
votes
5answers
13k 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 ...
0
votes
1answer
3k views

Internal Server Error (500) using Managed Client Object Model

I'm attempting my first foray into the Client Object Model. In the following code, using (ClientContext context = new ClientContext(url)) // url works w- SPSite { Web web = context.Web; ...
2
votes
2answers
2k views

Delete all list items with Client Object model

Is there any more efficient way of deleting al list items than getting all items and then deleting them one by one (item.DeleteObject())?
0
votes
1answer
485 views

Albums and images from Photo Gallery with Client Object Model

I have a photo gallery library. I want to get all albums and their images. Now I get all albums (root level items) with something like this: ClientContext ctx = new ClientContext(_url); _mylib = ...
3
votes
1answer
194 views

Time conversion via ClientContext

In native SP list I have item with datetime field which shows 24.1.2010. 00:00:00. When I try get it with ClientContext, I got that item field with the time 23.1.2010. 23:00:00. I understand that ...
3
votes
1answer
1k views

People Picker control for Silverlight, or alternatives?

This is probably a longshot, but does anyone know of a way to resolve a name entered in a Silverlight textbox to a SharePoint User object in Silverlight, using the client object model? Ideally, I'd ...
2
votes
1answer
3k views

ClientContext + camlQuery.ViewXml

I use SP Client and want to return ListItemCollection which will be filled with items from specific view which I choose. I get ViewQuery string by sending view index in viewcollection. Problem is in ...
2
votes
1answer
408 views

Client Object Model equivalent of SPPersistedObject?

I have some data for my SP feature that is using the hierarchical object store to persist the data. I would like to read this data using the Client Object Model in an application that will be running ...
1
vote
2answers
661 views

No return from asynchronous query

I am unable to retrieve objects using the ClientContext.ExecuteQueryAsync method. Originally I was attempting to obtain a list item, but figured out that wasn't happening because I didn't really have ...
1
vote
1answer
383 views

SharePoint 2007 Search Webservice client call - darrenjohn's API

I want to get the same result set as sharepoint search returns using webservice/object model, what is right way of doing it? Let's say: If sharepoint search core result webpart says 20 items/result ...
1
vote
0answers
466 views

Get group membership of current users using ECMAScript [duplicate]

Possible Duplicate: How do I determine a user's SharePoint group membership using the client object model? How can I use the client object model to get a list of all (SP) groups the ...
1
vote
2answers
3k views

Using JavaScript Client OM gives error “ExecuteOrDelayUntilScriptLoaded was not defined”

I have: IN THE HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> ...
2
votes
2answers
344 views

link documents in sharepoint 2010

how can i create a link to a document in a library in c# using the object model in sharepoint 2010?
1
vote
1answer
297 views

ClientContext - how to tell if you have an active connection?

I have this code : ClientContext clientContext = new ClientContext(this.siteURL); List oList = clientContext.Web.Lists.GetByTitle("AList"); I cant seem to access any properties for oList, is there ...
0
votes
2answers
85 views

How to provide a generic service to create and update documents

Problem: We need to create a generic document repository that will store all documents within an enterprise. The repository will be used by external systems, that is other SharePoint Web Applications ...
9
votes
1answer
2k views

Client Object Model Equivalent of SPSiteDataQuery?

I'm looking for an equivalent to the SPSiteDataQuery functionality in the Client Object Model (COM). The CamlQuery can be used with an instance of List to execute SPQuery level of aggregation, but is ...
0
votes
1answer
742 views

Refreshing a document library using the client side UI in 2010

After adding a document to a sharepoint document library from an SPModalDialog, how can I refresh the underlying list using the new 2010 client object model in SharePoint?
0
votes
1answer
2k views

Can't add item using client object model of sharepoint 2010 with read only permission to user

I have already developed Silverlight application in SharePoint 2010 using client object model. But I have one scenario that user can comment on the item, so there is a update operation come in ...
0
votes
2answers
250 views

Sharepoint - 2010: how to add ajaxified part into standard list

I am new to Sharepoint and nearly completely satisfied what lists can do out-of-the-box. But I have to add new column with ajax autocomplete features. I'm extensively reading documentation, books ...
0
votes
1answer
2k views

Create a new link to a document using SharePoint 2010

I need to add a new document link to a document library using the client object model. I suspect I could copy the format of the .aspx file used in the "link to a document" items and upload it as a ...
1
vote
1answer
596 views

Custom ECB dropdown menu API?

In 2010 (or 2007) is there a server control that is responsible for rendering of ECB menus? For example, if I wanted to create a custom UI for a Document Library (NOT using XSL/DataViewWebPart/etc), ...
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 ...
2
votes
0answers
358 views

How do I get the full folder path of a selected list via the Ribbon and Client Side Script? [closed]

What I want to achieve is something similar to this OOB method: SP.ListOperation.Selection.getSelectedList() But this method only returns the GUID of the selected list. I would like to get the ...
12
votes
2answers
2k views

Cannot add custom web part to page using the JS OM

I'm trying to add a custom web part (that is one I have written myself) using the new Javascipt OM available with SharePoint 2010. My solution is also running within the Sandbox. I have it working ...
0
votes
1answer
1k views

ECMAScript Client OM with External List

In SharePoint 2010, for a regular "custom" list calling SP.ListOperation.Selection.getSelectedItems() using the ECMAScript client object model returns an array of item IDs. These IDs correspond to the ...
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: ...
5
votes
1answer
523 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?
4
votes
2answers
334 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 ...