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

learn more… | top users | synonyms (3)

1
vote
1answer
447 views

How to add attachment to new item silverlight client object model

I am trying to add an attachment to new item but I could only succeded to upload the attachment into the list's folder (not to list's attachment folder). How can I achieve uploading the attachment on ...
4
votes
1answer
977 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. ...
2
votes
1answer
2k views

How to upload a file larger than 2MB to SharePoint document library using Managed Client Object Model for Silverlight

I can't seem to upload a file to SharePoint if that file exceeds 2MB or so. I am developing a Silverlight application that is interacting with SharePoint via Managed Client Object Model for ...
1
vote
1answer
306 views

How to cancel pending actions in Client Context? (Managed Client Object Model)

I have written a code relying on Managed Client Object Model which performs the following actions: Creates a site Web site Creates a list List list1 Creates a list field FieldText field1 (which is ...
4
votes
2answers
229 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 ...
3
votes
3answers
13k views

Getting the URLs of the SharePoint sites, lists and list views using Managed Client Object Model

Let's say that I have created: A SharePoint site collection at http://mysharepoint/. A subsite of that site collection titled Team site at http://mysharepoint/teamsite/. A list titled My List ...
8
votes
3answers
3k views

How to add list web part to the SharePoint page using Managed Client Object Model?

I am trying to add new web part to the SharePoint page using Managed Client Object Model that will display a list. I can't seem to be able to figure out the code of the web part's XML that is ...
3
votes
1answer
2k views

REST API + Expand Recurring Calendar Events?

Is there a way using the REST API (through javascript) to expand recurring calendar items? Or is there a helpful client side utility to assist with this?
6
votes
4answers
8k views

SharePoint 2010 Javascript Client Object Model cross site collections?

I've read some unofficial things online that using the Javascript client object model to retrieve content from other site collections is not allowed due to prevent the equivalent of "cross site ...
1
vote
1answer
417 views

Cannot cast to clientContext.CastTo<T> (Managed Client Object Model)

I am writing a method that is supposed to create a SharePoint list field. I want to be able to make my method return the newly created field. The problem that I am facing is that ...
1
vote
1answer
436 views

How can i get entire role assignments from SP 2010 using the COM interface including the users in the AD groups and not the groups names?

I've been trying to get all the RoleAssignments using the COM interface. the problem is that i get the AD user group names instead of the actual users inside the groups. my code looks something like ...
2
votes
2answers
3k views

How to add new item in Links list using Managed Client Object Model?

I have created a standard SharePoint Links list, using Managed Client Object Model (for Silverlight). Here's the code: ClientContext clientContext = new ClientContext(sitePath); ...
2
votes
1answer
413 views

Access My Content using ecmascript client OM

Is is possible to access the current user's "My site" and "My Content" using the ecmascript client OM? Specifically I'm looking to create a custom list, that is specific to each user, and wanted to ...
1
vote
3answers
1k views

upload a file with metadata without creating a new version using the client object model

What I'm trying to do is upload a file with metadata without creating a new version using the client object model. I already have this code: byte[] bytes = ...
0
votes
1answer
690 views

Using the Sharepoint Client Object Model with ASP.NET C# page

So why when I add the line <%@ Import Namespace="Microsoft.Sharepoint" %> does the page error with: An error occurred during the compilation of the requested file, or one of its ...
8
votes
1answer
4k views

How to Impersonate Users Via Client Object Model?

I want to insert new SP List items -- blog comments, to be exact -- on behalf of other users. Ideally, I'd just pass a SharepointID for the user, but that doesn't seem to be possible. I think that ...
5
votes
4answers
11k 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, ...
0
votes
1answer
874 views

Slow running Managed Client Object Model application

I have an application that I built using the Managed Client Object model that performaing poorly and I am curious if I am doing something wrong. The application drills down throw a hierarchy of three ...
3
votes
1answer
3k views

How do I save files that are larger than 1MB using the Client Object Model?

I'm trying to save a file to an SP document library using the Client Object Model: //populate information about the new file, from disk FileCreationInformation fci = new FileCreationInformation(); ...
8
votes
1answer
5k views

How to get a list of all Choice field options using Client Object Model

How would you get a list of all the possible choices from a choice field (e.g. Task list Priority or Status fields) using javascript client object model?
0
votes
1answer
1k views

Setting a Publishing Hyperlink Field Value that has no Value

I am using the Object Model and the Microsoft.SharePoint.Publishing.Fields.LinkFieldValue namespace in an attempt to set the value of a Hyperlink Column on a SharePoint 2007 Publishing Site. ...
2
votes
1answer
1k views

How do I get a specific file using Client Object Model in Silverlight?

I can't seem to find any direction when trying to filter a FileCollection (Picture Library) by a specific value. I am 'trying' to use the Silverlight Client Object Model to access list data in ...
8
votes
3answers
14k views

How can I use the SharePoint Javascript Object Model from a plain HTML page?

I would like to use the SharePoint Javascript Object Model from a "plain" html page (ie, not an .aspx application page etc.) Is this even possible? If so, what scripts should I reference? I've added ...
1
vote
1answer
82 views

Is it possible to use the Javasciprt client object model from a different web server?

Basically I would like to host an application on a different server than my SharePoint server. Using the managed client object model I have been able to access data on my SharePoint server, but I'm ...
2
votes
1answer
614 views

Client object model thread safety

Is ClientContext thread-safe? I'm using Parallel framework to parallelize some work that creates new items on the list. Example: using(var ctx = new ClientContext(siteUrl)) { var list = ...
0
votes
1answer
154 views

Access different site collection using client OM

I have written a little app, which makes use of the ECMA client OM. I need to access from a site-collection "/sites/subsite" a list, which is located on the site-collection "/". However, this shows a ...
5
votes
1answer
514 views

structure of sharepoint javascript functions

I am trying to understand more the structure of javascript functions in SharePoint. Why does every function begin with som value than colon and semicolon like ULSrE8:; in spgridview.debug.js: ...
1
vote
1answer
4k views

Setting User column value via Client Object Model

I'm trying and failing to set the value of a User column via the SharePoint client model: int userID; string displayName; /* Look up userID and displayName from Web Service here */ ...
2
votes
1answer
72 views

Silverlight application privileges

I have a silverlight application which uses the client object model to access the sharepoint server. When i run the app "out-of-browser" with elevated trust everything works great, but when i try it ...
2
votes
1answer
889 views

ClientRuntimeContext to ClientContext

I was wondering if their is any way to convert ClientRuntimeContext into ClientContext. i am retrieving the ClientRuntime context like this public File uploadBase(Document document, Folder ...
0
votes
1answer
522 views

Building a Floating Menu for SP 2010

I would like to have a floating menu the menu can come from a list or use the Quick launch. Any ideas or samples out there.. For example if i can make this float ...
2
votes
1answer
1k views

Enable versioning Document Library

i am trying to enable versioning on a ducument library using the client object model my code currently is as follows when i create the document library. ClientContext clientContext = ...
4
votes
2answers
4k 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 ...
1
vote
1answer
1k views

SP2010 Client Object Model 3 MB limit - updating maxReceivedMessageSize doesnt get applied

I am using Client Object Model to interact with Sharepoint 2010. When I tried to upload documents greater than 3 MB using Client OM, it gave an error Bad Request. Microsoft suggests this to fix the ...
2
votes
2answers
598 views

Popup to allow emailing of current URL

I'd like to implement an email icon on the pages of our SharePoint 2010 site collection; when the user clicks it, a Lightbox-style popup allows the user to email the current URL with a custom message ...
1
vote
1answer
805 views

How can I access the Taxonomy store using the Client Object Model?

We are writing an Outlook plugin and need to create an overview of the available Managed Metadata term stores and terms from clients that connect to SharePoint. I have used the TaxonomySession to do ...
2
votes
4answers
9k views

How to check if a folder exists in a list?

I have the following code: SPFolder oFolder = myList.RootFolder.SubFolders[folderName]; if (oFolder == null) { Console.WriteLine("FOLDER NOT FOUND"); ...
3
votes
1answer
757 views

Permissions error in IE 8 but not Firefox 6.0.2?

I am using the Javascript Client Object model to access some information from a list. Below is the code I am using: function getDeptInfo(id) { //var value = ...
0
votes
2answers
1k views

Get list of web parts on the client-side

Is it possible to use the Client Object Model or jQuery to get a list of the SharePoint 2010 web parts on a certain part of the page, say those in the DIV #main-content? To be more specific, I'd like ...
7
votes
1answer
3k views

Fetch list of sites in site collection into jQuery

Is there a way to get the list of sites in the current site collection into jQuery as an array or other data structure? Thanks.
7
votes
1answer
5k views

Get a value included from a lookup column using the JavaScript Client Object Model

Related: How to retrieve a ListItem using the Javascript Client Object Model? In my previous question I was able to successfully retrieve a basic value from a list item. My problem is that I am now ...
0
votes
1answer
1k views

Close SP.UI.ModalDialog on form submit

I am using the SP.UI.ModalDialog to popup a custom form. The form uses an XSL stylesheet that uses the GenFireServerEvent to commit the data. This works correctly, but I want to close the popup once ...
2
votes
3answers
516 views

Getting item id after inserting with Javascript Client OM

Is it possible to get the inserted item id after executeQueryAsync? Or do I have to send a second query to get the item id?
2
votes
1answer
8k views

How to retrieve a ListItem using the Javascript Client Object Model?

Right now I am using this method: function getWebProperties(id) { var ctx = new SP.ClientContext.get_current(); this.website = ctx.get_web(); this.listCollection = website.get_lists(); ...
0
votes
1answer
117 views

Proper way to retrieve list data asynchronously?

I have done this in the past using jQuery's ajax function and the SharePoint web services, but I'm curious if it is considered a better practice to use the Javascript Object Model? Also, is it secure ...
1
vote
1answer
816 views

How to Union 2 Lists Using ClientContext?

I have 2 lists which both contain identically-named fields that I'm trying to access using C#. Using ClientContext, how can I perform something that does the same thing as a SQL Union to give me one ...
4
votes
2answers
8k 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 ...
2
votes
2answers
5k views

How do I get the number of items in a list?

I have a list with a lot of items in it I need to know the list item count the following is my code: var sListId = SP.ListOperation.Selection.getSelectedList(); var oWeb = ...
3
votes
3answers
7k views

How to get list by url using client object model?

Is it possible to get list by url using ECMA script client model? For example something like this: context.get_web().get_lists().getByUrl("Lists/MyList");
1
vote
1answer
866 views

UserMulti Field limit

Does UserMulti field have a limit on how much users are selected? I'm asking this because when I use client object model I can set at most 15 users at once. edit: I can add more users directly on ...