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

learn more… | top users | synonyms (1)

1
vote
1answer
1k views

How to check if current folder in document library has child items via JavaScript client object model?

I have a custom button on ribbon, which performs some action with current folder (download folder content as zip package). I want to disable this button in case if current folder doesn't contain any ...
1
vote
1answer
385 views

Windows Application to access the list in a Sharepoint Site using Client Object Model

I have created a Windows Application, which uses Client object model to access lists in a Sharepoint site(installed and configured on a separate server). I have used the default credentials to access ...
3
votes
3answers
3k views

Javascript to get GUID from SharePoint

I am newbie to SharePoint and I am uploading a file to the server using javascript. Now the task is to get the GUID of that file and display it ({alert(guid); is fine). I don't even know where to ...
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 ...
3
votes
2answers
412 views

Publish contenttype after activating feature (Office 365)

I've created a Contenttype and some fields in a visual studio project. They are deployed when activating the "Content types"-feature. But here's the problem: I want them to be deployed to the Content ...
3
votes
2answers
2k views

Programmatically add Event to Sharepoint Calendar using Client OM

I need to programmatically add events to a SharePoint Calendar and make them repeatable using JavaScript Client Object Model (without any c# code). Does anybody have ideas how can I implement this ...
1
vote
1answer
429 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
835 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
251 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
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 ...
3
votes
3answers
9k 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
1k 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
6k 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
328 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
353 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
2k 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
411 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
922 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
572 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
3k 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 ...
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, ...
0
votes
1answer
693 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(); ...
7
votes
1answer
3k 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
11k 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
79 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
430 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
470 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
3k 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
71 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
539 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
493 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
943 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
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 ...
1
vote
1answer
919 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
527 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
759 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
7k 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
720 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
978 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 ...
6
votes
1answer
2k 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
3k 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
465 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?
1
vote
1answer
7k 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(); ...