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

learn more… | top users | synonyms

4
votes
3answers
2k views

Dynamically registering JavaScript from within a sandbox web part

I am mid-way through development of a corporate intranet that will be hosted in SharePoint Online. For this reason, we are restricted to using sandbox solutions. One of the last "gotchas" that I need ...
1
vote
1answer
890 views

Getting the Item ID from the ECB (Edit Control Block) using JavaScript

I know I can use {ItemId} to pass it to the URL like so: <UrlAction Url="~site/_layouts/ConvertItem/ConvertItem.aspx?ListId={ListId}&amp;ItemId={ItemId}&amp;ItemUrl={ItemUrl}"/> ...
2
votes
2answers
2k views

Share Point Client Object Model SAML token from STS

I am planning to use the share-point client object model to get the data(Lists etc) from share-point site ( Sharepoint site and mobile sites are hosted on two different machines/IIS servers). I do ...
5
votes
3answers
5k 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 ...
1
vote
2answers
1k views

Add value to Choice field through ClientContext API

I'd like to add and select values to a choice field in a document library. Something obviously more tricky than I remembered. I'm doing something like this but it doesn't work. The value gets added ...
2
votes
1answer
45 views

SP Tools help - Not returning results

I have downloaded SPTools from github, and have followed the directions of uploading the files to a Document Library. When I try to open the index.html file from the document library, I get prompted ...
2
votes
2answers
211 views
1
vote
1answer
333 views

Bind WPF DataGrid to ListItemCollection

I need to display the items from a list in WPF application. I have WPF DataGrid and I use managed client object model to retreive the list items. I would appreciate if someone can explain a way to ...
0
votes
1answer
499 views

VB CAML Query to select most recently created List Item where name = 'Blah'?

Can someone tell me how the VB CAML Query would go to select the most recently created List item where 'FullName' field = 'Joe Smooth'. Using Silverlight 5, SharePoint Client Object Model, VB.Net and ...
0
votes
2answers
1k views

Get current user from SP Client Object Model in Silverlight / VB

Using Silverlight 5, VB.Net and SharePoint Online. Tried this to read the current user's name into a textbox, but the textbox remains blank. Any ideas? Thanks. Imports Microsoft.SharePoint.Client ...
1
vote
0answers
128 views

How to Reconcile External Data and Multiple Values for a List Item?

I am currently developing a solution that requires me to integrate a SharePoint 2010 list (generic list type) with items from a SQL Server database. In addition to this hypothetical field being ...
3
votes
1answer
3k views

access a list in a subsite with Javascript

How can i access a list in a subsite? function Read () { var caml = "<View><ViewFields><FieldRef Name='Title'/><FieldRef ...
1
vote
1answer
139 views

Access a Sharepoint site from event handler

my problem is that I want to pop up a status bar in SP2010 after a File was uploaded via a single uploadform to a List. Found this in the net: ...
0
votes
2answers
818 views

Is there any way to access a managed meta data service using only javascript in SharePoint 2010?

I am creating custom forms in a SharePoint site. The only thing is most of our Lists contain managed metadata fields. I have been successful in adding new items to Lists having only standard fields ...
0
votes
1answer
217 views

Long running Silverlight app losing connectivity via Client Object Model after a while?

I have a Silverlight 5 app hosted in SharePoint Online, which asks the users 72 questions and right at the end writes their answers to some SharePoint lists. When I trialled it with 8 users, the ...
1
vote
2answers
547 views

js/jquery doesn't work on site's upload.aspx?

is that right? If I go to a library in the designer, i can see upload.aspx there. Can't create a new one (and i guess that is because there is really only one per site, or collection?). Anyway, I can ...
0
votes
1answer
674 views

Get the parent of a List Item

Given the following information; string webUrl, Guid listId, int itemIdInList I'm trying to retrieve the parent of this item, whether that is a List or another ListItem (i.e. a folder). Can anyone ...
3
votes
2answers
542 views

calling click event on dynamic controls

What I have is fairly standard code for using JavaScript with SharePoint 2013. Inside the sharePointReady function, I have a few dynamic controls that are added to the page. The problem is that when ...
2
votes
1answer
202 views

Why Isn't the Client Object Model as Vulnerable as I Think?

I can use any sort of console in Firebug, Developer Tools, etc. to access any Javascript included in a page and make calls to Javascript functions without a problem. If, on a SharePoint page, I use ...
1
vote
2answers
586 views

How to Get Server Time in Silverlight

How do you get the server DateTime in Silverlight in SharePoint 2010?
0
votes
2answers
344 views

COM: javascript/jquery method for creating a xml data file from SharePoint list data (multiple)

Does anyone know how I can pull off creating an xml data file from data in multiple lists using SPServices/Javascript/jQuery? I can certainly bring all the data I need out to a page and load into DOM ...
1
vote
2answers
1k views

Is there a method to lock a SharePoint library as read only while client app is processing?

I'm currently writing C# code to automate doing a set of actions on a number of Excel files in a document library/folder tree. The actions include check out, running macros inside the Excel file, ...
3
votes
1answer
565 views

Client Object Model - change the 'Editor' of a directory (SPS2010)

I'm trying to rename a folder in a Sharepoint document store through a web application. Changing the folder name works fine, but the name of the editor became the service user running the web ...
12
votes
3answers
6k views

Grab a specific property bag using ECMA script

I am trying to grab a key/value pair from a specific property bag but can't find any documentation or example code on how to grab a property bag. Currently I can only seem to grab allProperties. Here ...
0
votes
3answers
1k views

ListItem Update from Client Object Model Not Triggering OnWorkflowItemChanged Activity

I am experiencing difficulty creating a file in a document library using the client object model. My custom Visual Studio 2010 workflow is not detecting the updates I am making to the file's list item ...
2
votes
1answer
12k views

The property or field has not been initialized. It has not been requested or the request has not been executed

I am getting this error and from what I understand this is when you try and access columns from the list item. I have tried various things including the line below: clientContext.Load(items, eachItem ...
0
votes
1answer
5k views

How to read URL/Description from a Hyperlink field using CSOM

Using CSOM (JavaScript) how do you get the URL and description fields from a Hyperlink field?
0
votes
1answer
264 views

problem with loading client object model

I am using JavaScript Client object model to get rootWeb and check permissions of current user. So I have used ExecuteOrDelayUntilScriptLoaded in my MasterPage to wait for sp.js. The problem is when I ...
0
votes
2answers
1k views

Batch update with javascript client object model?

Anybody know how to do batch list updates with the javascript client object model in Sharepoint 2010? I'm putting the list into an array right now and then a kendo grid is reading it. I can update ...
1
vote
1answer
2k views

Access Object By a Single URL with the Client Object Model

Does the SharePoint Client Object Model have any method to access an object (List, Document, etc.) with just a single URL and valid credentials? Essentially, I want to access an object ...
1
vote
2answers
465 views

Which one is strongly typed the SharePoint Client Object Model or REST

I was researching about the SharePoint Client Object Model and REST but I am confused which one is strongly typed.
2
votes
1answer
2k views

Delete item from Client Object Model

I'm trying to delete an Item from a list using the following code: using System; using Microsoft.SharePoint.Client; using SP = Microsoft.SharePoint.Client; namespace ...
0
votes
1answer
2k views

Getting list length from caml query

I am currently trying to determine the length of a list that is located on my SharePoint site. I am using a Caml query to retrieve the items in my list, but I can not figure out how to get the length ...
12
votes
3answers
19k views

How to get all items in a View using Client Object Model (JavaScript)

To get all the items in a List you use // Setup context & load web context = new SP.ClientContext.get_current(); web = context.get_web(); context.load(web); // Load task list this.List = ...
2
votes
1answer
2k views

Incorrect Modified Dates on SharePoint Online for clients in other timezones

I've run into a strange problem with SharePoint Online. When updating or creating entries in a list using the Client Object Model, the modified date on the affected list item seems to be stored with ...
0
votes
2answers
5k views

How Can I Add a New File to a Document Library With Client Object Model?

I'm a beginner with SP COM. I can't find any samples about this online. Could anybody tell me how I should proceed to add or remove a file from a document library in SP 2010 with the Client Object ...
3
votes
1answer
2k views

Client Object Model - Update Document Library Metadata - Lookup Field with no required value

I am attempting to update metadata for documents in a document library (or List) using the client object model. I have whittled down a number of the error messages I was getting and now I am hitting ...
1
vote
2answers
796 views

Get id's of tags that are in a web part in Javascript

Ok, I have a page that that has a DataFormWebPart that basically displays the info from a document library. Now what I want to do is, using jquery, display or hide a section in the web part. I can do ...
5
votes
2answers
4k views

SharePoint 2010 .NET Client Object Model - add item to Web property bag

I'm trying to add a new item to the Web property bag using the SharePoint managed client object model, but it fails to persist. I'm using the following code: using (var context = new ...
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 ...
0
votes
1answer
662 views

Using client object model to trigger Content Organizer Rule

Using the client object model of sharepoint (Microsoft.SharePoint.Client) i'm trying building a client that will upload documents into the "Drop Off Library" within a record center site. I can upload ...
4
votes
4answers
7k 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 ...
1
vote
1answer
544 views

How to get a full name from a User Lookup Field using ECMA CSOM

How do you get a user's full name using the ECMAScript (JavaScript) CSOM?
0
votes
0answers
529 views

How to send Email using Client Object Model ECMA Script/Javascript?

I want to send Email using Client Object model JavaScript.. I found Somewhere that it is not possible using Javascript but as I am using NAPA Tool for development in SharePoint 2013 this is the only ...
0
votes
2answers
689 views

Route a document to a Record Center using Client Object Model

I need to programatically upload a document and route to the record center with all content organizer rules. This should be a Client Object Model Solution. I have a solution in Server Object Model. ...
1
vote
3answers
1k views

401 with ClientContext

I am connecting to SharePoint via managed client api. ClientContext connects to the site and access the list data when I specify the site address as http://computer_name but when I give the configured ...
0
votes
1answer
315 views

Modal Dialog unexpected redirect

I follow these steps: 1) Open file permissions page in modal dialog clicking "Document Permissions" button on the Ribbon menu. The next page is opened: 2) Then I click "Modify" -> "Edit User ...
3
votes
1answer
2k views

Can I Access the SPAuditQuery from the JavaScript Class Library?

Or there's a SP2010 Built-in service to access Audit data? [UPDATE] Quick awnser, No, there's no way to access the SPAuditQuery from the SP JavaScript Class Library. At the end I end up using a WCF ...
1
vote
2answers
166 views

Implementing a better user experience for interacting with a document library

We are about to start a project to implement an enterprise collaboration platform on top of SharePoint 2010 It's basically the notion of workspaces where users can exchange files. However, given the ...
1
vote
2answers
3k views

Read data from excel sheet using SharePoint2010 Excel Services

I am working with SharePoint 2010. I am created client object model application to access data from Excel Sheet which is uploaded on SharePoint Server. How can i do this ?