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

learn more… | top users | synonyms

4
votes
1answer
2k 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 ...
1
vote
1answer
893 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}"/> ...
6
votes
1answer
4k views

How to Upload File to Document Library using JavaScript Client Object Model?

I want to Upload File to a Document Library using JavaScript in SharePoint 2010. I found that you can copy file from One Document Library to Another but you can't upload File using JavaScript on this ...
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 ...
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 ...
4
votes
1answer
3k 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: ...
1
vote
1answer
335 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
501 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
140 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
1answer
219 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 ...
10
votes
2answers
1k views

Opening and closing AssetPortalBrowser.aspx in SharePoint modal popup

I am trying to open the "OOB" AssetPortalBrowser.aspx from a page within a SharePoint native modal popup. My aim is to get the selected filename back to the script. So far I was able to open the ...
2
votes
1answer
2k views

Calling Upload Dialog with javascript, can I pass value through to the edit form that follows?

I have a button that opens the upload dialog from a page using the below approach: function openUploadNewDocumentDialog(passingID) { var dialogOptions = SP.UI.$create_DialogOptions(); ...
1
vote
2answers
549 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 ...
2
votes
2answers
212 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 ?
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
587 views

How to Get Server Time in Silverlight

How do you get the server DateTime in Silverlight in SharePoint 2010?
1
vote
2answers
653 views

Sharepoint 2013 publishing page creation using Client Object Model

I am using SharePoint 2013. Is there any way I can programmatically create a page using ONLY th Client Object Model? Also notice that the page should be editable for further use.
0
votes
2answers
349 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 ...
2
votes
1answer
425 views

Changing Content Editor Programatically - Client model API?

Is it at all possible to make changes to or add a content editor to a page using only the Client Object Model API? There does not appear to be any reference to a ContentEditorWebPart dll.
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?
4
votes
2answers
491 views

How to parse a SharePoint URL to get CSOM objects?

Let's say the only input I have from the user is the full URL to a folder in a Document Library called "Public Documents": http://intranet.contoso.com/SubSite/PublicDocuments/Folder/SubFolder/ Using ...
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 ...
8
votes
5answers
9k views

Creating Nested Folders via Client Object Model

I'm trying to create nested folders in my document library so it looks like this: http://site/PublicDocuments/Folder1/Folder2/Folder3/ The document library "Public Documents" exists but none of the ...
6
votes
2answers
1k views

Previous versions of ListItem with CSOM

When using Client-Side Object Model for SharePoint 2013, how can I access previous versions of List Item?
2
votes
4answers
8k views

Get value of Hyperlink field in Sharepoint 2010 list item

I'm trying to get the value of a field of type "Hyperlink or Image" (currently set to "Hyperlink" in the column settings that is being returned as part of a Sharepoint 2010 ListItem. I'm using the ...
0
votes
1answer
265 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 ...
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 ...
9
votes
1answer
268 views

Passing args to QuickLinksDialog with JS

I have a small button on a site which when i press should start a QuickLinksDialog and fill in some of the fields there. Everything goes good and well except the fields (like: title and url) still ...
2
votes
1answer
327 views

How to add Pragma No-Cache to Client Object Model Request

In developing an application that uses the SharePoint Client Object Model, we noticed that the application is not working correctly using Safari on our iPad devices. When testing on our desktops, we ...
1
vote
2answers
466 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.
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 ...
3
votes
1answer
107 views

Copy folder from Source-Library and paste it to Target-Library?

I need to copy a folder from a SharePoint 2010 library and paste this folder into another library e.g. the folder: "myTestFolder" from mysharepoint/sourcelibrary to mysharepoint/targetlibrary ...
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 ...
2
votes
1answer
3k views

Querying for File properties plus ListItemAllFields properties

I'm trying to retrieve both a file's Id in its list, plus its ETag, using the following snippet; using (var clientContext = new ClientContext(webUrl)) { var results = clientContext.Web.Lists ...
1
vote
2answers
801 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 ...
1
vote
3answers
5k views

How to get Item name and extension from itemID and listID in javascript client object model

in my custom page i receive two parameters - a list ID of a list and an Item ID of an item inside said list. So i write this: function getfileName() { var clientContext = ...
0
votes
1answer
666 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 ...
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 ...
1
vote
1answer
546 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
531 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
1answer
675 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 ...
0
votes
1answer
703 views

How to create a new document from a Document Template using Client Object Model

I require to programatically create a new document using the Document Template URL of the document Library and this requires to be done using the Client Object Model. I also require to do this without ...
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 ...
2
votes
1answer
3k views

How to find relative URL of a document library using CSOM

To upload a file using File.SaveBinaryDirect you have to know the server relative URL of the document library you're working with. Example from MSDN :- ClientContext clientContext = new ...
8
votes
3answers
8k views

How to Use ECMA CSOM to Set a Field of Type SPFieldUserValue

I have a JavaScript array containing the string representation of some usernames (domain\username format). Using the JavaScript CSOM, what is the best way to create a new item and add those usernames ...