API for interacting with SharePoint from .NET, Silverlight, and JavaScript.
9
votes
3answers
2k 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 ...
7
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 ...
12
votes
3answers
1k views
Client Object Model equivalent of SPUtility.SendEmail in SharePoint 2010
I am trying to send an email after an action occurs in Silverlight WebPart I am designing.
Is there a built-in class in the Client Object Model that can handle this, or will I have to build a ...
1
vote
3answers
867 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 ...
26
votes
9answers
7k 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 ...
3
votes
1answer
343 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:
...
5
votes
1answer
4k views
Pass parameters in ExecuteOrDelayuntilScriptLoaded in Javascript client Object model
I have written a javascript client-object model code and I am calling it through the below line code from content editor webpart:
ExecuteOrDelayUntilScriptLoaded(getWebSiteData(sys), "sp.js");// ...
5
votes
4answers
786 views
How to access a Web application/Farm level property bag via jQuery/Javascript/ClientContext
It it possible to access the Web application/Farm level property bag using jQuery/Javscript/ClientContext? If not, then what are the possible alternatives to access Web Application Farm level property ...
4
votes
4answers
6k views
Javascript to display sharepoint list items on page load
With Client Object Model API and a bit of javascript, I want to retrieve the items of a sharepoint list and display them into the web page, when the web page loads.
I've successfully implemented ...
4
votes
6answers
7k 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.
3
votes
5answers
8k 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 ...
1
vote
1answer
4k 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();
...
1
vote
0answers
461 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 ...
0
votes
1answer
176 views
Registering pageComponent using ClientObjectModel
is there any ways to register PageComponent using client object model?
I want to add custom action on the edit form with dynamically populating FlyoutAnchor. But when page has been loaded i recieve ...
26
votes
6answers
18k 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 ...
5
votes
2answers
821 views
How to retrieve distinct values with JavaScript Client Object Model
How can you get distinct values from a SharePoint List column using JavaScript without a huge performance hit?
A simple example would be appreciated :)
6
votes
1answer
1k views
Context Menus - Send To not working in IE9
I have a document center with a custom master page. The page is designed with IE9/HTML5/CSS3 in mind. In my other question, I worked out how to fix the IM Presence icons by fixing some core ...
4
votes
2answers
1k views
How to read a column type SPUser, DateTime, Currency with EcmaScript?
I have a list in SharePoint 2010 with some columns. All are default types. So I have
"Single line of text"
"Multiple line of text"
"Date and Time"
"Choice"
"Number"
"Currency"
"Person or Group"
...
4
votes
4answers
3k 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
2answers
229 views
Error while pdating Master Page through JavaScript Client Object Model using SP 2013 App
I have created a Site Collection in SharePoint 2013 online.
In this site I am trying to update Master Page through JavaScript Client Object Model.
My JQuery scripts are able to change the Site Master ...
5
votes
4answers
3k views
Get current web url in a SPRibbon Custom Action Command
I've a SPRibbon custom action with the purpose of open an custom app page in a modal dialog,
but I'm getting troubles for getting the current web URL, as well, set a reference for a .js with the right ...
5
votes
1answer
1k 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.
4
votes
3answers
5k views
Cannot get field value of list item through JavaScript
I try to get the value of a list item (that is currently selected). I know that I must load it into the context but even with loading the field explicitly I get the following message.
Microsoft ...
4
votes
1answer
1k views
How to 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 ...
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
2answers
3k 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 ...
1
vote
3answers
826 views
jquery and javascript : can i get the last ID from document library?
Is there a way to get the last ID from a Document Library with javascript/jquery?
3
votes
2answers
1k views
Managed Metadata and the client OM
Is it possible to return the values of a Managed Metadata field assigned to a document using strictly the client object model? Note that I want to return ALL the possible values and allow the user ...
3
votes
3answers
1k 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 ...
2
votes
1answer
666 views
no sorting with JavaScript Client Object Model?
I have the following JSOM code:
var query = "<View><Query><Where><Eq><FieldRef Name='Category'/><Value ...
2
votes
2answers
366 views
Does Managed Client object model work for Cross Domain?
I want to know whether managed client object model works in cross domain cases.
For example I have a console application in Domain A, can I use managed client object model in the console application ...
2
votes
2answers
2k 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
47 views
How to open file in adobe reader using command line without checkout from Javascript?
I am working on print functionality. I am printing the PDF files (uploaded in SharePoint Library) using Adobe Reader command line from javascript. I am using ActiveX object to call the cmd. refer ...
1
vote
1answer
193 views
Working With Content Approval / Moderation In CSOM
The SharePoint Object Model provides a property of an SPListItem called SPListItem.ModerationInformation.Status to allow you to determine the current content approval / moderation status if a document ...
1
vote
2answers
332 views
Disable List Event Handler in the Client Object Model
I have a client windows application that is uploading many rows of data to a list. However, I don't want the event handler on the list to fire while rows are being added via the windows application.
...
1
vote
1answer
935 views
JavaScript SP.CamlQuery() return DateTime fields with offset (in my case +11 hours)
JavaScript SP.CamlQuery() return DateTime fields with offset (in my case +11 hours).
In standart Display/Edit forms and views display correct DateTime.
How to get correct DateTime via SP.CamlQuery()?
...
1
vote
3answers
281 views
How to access documents with in a custom content type of Document Set
I have a Library, which stores document sets (the content type here is a documentset which contains more than one word document). Currently I can to get the items from the library using the below code
...
0
votes
1answer
33 views
Date from list being displayed wrong on graph created programmatically
I have a list, where one column is of type datetime and another a numeric value.
The records are being entered correctly, in the form:
ID Col01 Col02
01 05/02/2013 6
02 05/03/2013 9
...
0
votes
2answers
69 views
Multiple Webparts with the same Javascript
I have a site with multiple Webparts. Some Webparts are linking on the same .html file.
The HTML file reads data from a list and displays it in a table by using javascript. My problem is that there ...
0
votes
2answers
397 views
Add multiple people using Javascript Client Object Model to a Field of Type SPFieldUserValue
I want to update a UserField client side.
I found the following code at this topic How to Use ECMA CSOM to Set a Field of Type SPFieldUserValue
Tried the following code:
var users = new Array();
...
0
votes
1answer
415 views
How to call C# (in a .WSP web part) from Javascript (in a Content Editor web part)
I have Javascript (Client Object Model) running in a Content Editor web part that controls other web parts on the page. The JS COM is limited in what it can do, so I want to be able to call managed ...
0
votes
1answer
267 views
GetListItem(strUrl) equivalent for ClientContext
I know using server side code I can use GetListItem(url) to get an item using a server relative/absolute url (such as this question) however I cant seem to find the same code using the Client Object ...
0
votes
2answers
204 views
Client Object Model Javascript intellisense
I created a new test.js file in the project node of my web part solution with VS 2010 and included the references:
/// <reference path="C:\Program Files\Common Files\Microsoft Shared\Web Server ...
0
votes
2answers
509 views
CSOM Query on Hidden User Information List returning nothing
I'm trying to retrieve a user's profile picture from the hidden User Information List within Silverlight. I can't use the UserProfileService.asmx because I don't have the login name nor the GUID of ...
0
votes
2answers
999 views
Adding description to sharepoint link URL using the C# CSOM
I'm currently adding the URL except the description is an ugly link.
I would like to add the description to the URL in a links list on sharepoint online.
My current code to add a new item from an ...
0
votes
4answers
5k views
Get Items Under Folder CAML
I am trying to retrive all items that are under a certin folder, in a document library.
this is what i have so far
List DocumentsList = clientContext.Web.Lists.GetByTitle(list);
CamlQuery camlQuery ...
0
votes
2answers
4k views
How do get selected item of list?
I have a webpart .I add a listviewbyquary in createchildcontrols and a hyperlink in visualwebpart.
i use this
http://graegert.com/featured/using-the-editorpart-to-create-a-custom-listview-web-part
...
0
votes
2answers
605 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 ...

