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

learn more… | top users | synonyms (1)

6
votes
1answer
3k views

CSOM Get ListItem of Folder

In an application I'm working on, I'm interacting with SharePoint (2010) via the .NET Client-Side Object Model, and am trying to account for a large number of possible configurations of document ...
5
votes
4answers
7k 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 ...
4
votes
2answers
2k views

How to enable publishing feature using CSOM?

How to enable site collection publishing infrastructure and site publishing features using CSOM?
4
votes
3answers
4k views

Query SP2013 Managed metadata term store

I was wondering if it is possible to query the Term Store via the REST API or Javascript Client Object Model in SP2013. I can't quite seem to work out the naming scheme for the REST API to discover ...
3
votes
2answers
1k views

View custom field property value using JavaScript

I'm using SharePoint 2010. Need to retrieve the Custom field property values using a JavaScript. [Trying to do this during item click in the SharePoint list item view. I call the JavaScript on the ...
3
votes
6answers
9k views

SP.UI.ModalDialog.RefreshPage from the dialog itself?

I have customized the display form on one of my list. On a webpart page, I have drop a view to this list. When I click on the title of my item, the custom disp form is shown as expected in a modal ...
3
votes
3answers
8k views

Get User via JavaScript Client Object Model

Is there a way to get user information via the JavaScript Client OM? Something similar to the clientContext.Web.EnsureUser(userName) method. I am aware that there is the SPService JQuery library, but ...
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
1answer
3k views

Properties when uploading Files using REST in SP 2013

After a lot of research I finally got uploads via REST working in SharePoint 2013. But I would like to provide additional properties to the Add Function like Title. This code works so far but the only ...
2
votes
1answer
737 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 ...
2
votes
1answer
5k views

How to open a form in a modal dialog popup using C#

I have virtually no experience with web development but now I need to create a web part for SharePoint 2010 and I am stuck. The web part is supposed to find all content types derived from folder ...
2
votes
2answers
2k views

SharePoint Client Object Model Assembly Distribution

I would like to know if it is illegal (against MS licensing agreement) to: Copy the Microsoft.SharePoint.Client and Microsoft.SharePoint.Client.Runtime assemblies from a SPF 2010 server to TFS ...
1
vote
2answers
751 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
3answers
3k 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?
1
vote
1answer
2k 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
2answers
1k 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
1answer
2k views

Getting the username from javascript client object model?

How do I go about getting the client username with the javascript client object model? I can't find anything helpful in microsoft's documentation, it's awful :|
0
votes
2answers
4k views

How to get List Name from JS Object Model - List Name from URL problem

I'm trying to connect Ribbon to Pages.. This works, javascript get what I need and pass as parameter to my page.. I pass the URL and the SelectedItemsID.. I'm facing a problem: If I had a List ...
7
votes
4answers
18k views

Get Site Collection full URL using javascript

I want to get the URL for my site collection. One way I thought I could do it was using the window.location in javascript and getting it that way. I know that you can use ECMA script and the client ...
4
votes
2answers
3k 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 ...
4
votes
1answer
2k views

no sorting with JavaScript Client Object Model?

I have the following JSOM code: var query = "<View><Query><Where><Eq><FieldRef Name='Category'/><Value ...
3
votes
0answers
181 views

Is it possible to retrive CRM online data from SharePoint Online using javascript? [closed]

So I would like to get data from Microsoft Dynamics CRM 2013 Online into my SharePoint Online SharePoint Hosted App. Is this possible to javascript only? Can I use the same Cross Origin Query ...
3
votes
1answer
1k 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 ...
3
votes
2answers
8k views

SPService GetListItems with CAML : can't get example to work

enter code hereI am using an example I found on codeplex of SPServices with CamlQuery to try to get list item values with where clause on the ID. For whatever reason this doesn't seem to work for me; ...
3
votes
2answers
4k 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 ...
2
votes
1answer
725 views

Programmatically trigger “New document” action in a document library

I've been asked to check if it is possible to trigger the creation of a new document linked to a content type. Like, to make it simple, you have a webpart, a button, you click it, and it opens the ...
2
votes
1answer
870 views

ECMA/js CSOM retrieving items from multiple lists with async processing? how?

I am struggling with javascript and learning callbacks, and applying this to SharePoint 2010 specific js/jquery methods of getting and savings values from lists. So I am recently getting into the ...
2
votes
1answer
2k 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 ...
2
votes
2answers
4k views

How to access the documents in using javascript in SharePoint 2013 Preview?

I try to get familiar with with the Javascript API of SharePoint 2013 (Preview). Therefore I started a SharePoint-hosted app using VS2012. The default app works just great after deploying to my local ...
2
votes
2answers
670 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
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 ...
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 = ...
1
vote
1answer
115 views

SP2010: Client object model: add new wikipage to document library

Is it possible to create a new wiki page using the client object model and give it some content ("<h1>Welcome to the SharePoint!</h1>")? I'm using VB.Net
1
vote
2answers
3k views

CSOM move the files one folder another folder

I have to all files from one folder another folder using CSOM and C# Thanks for your replay Huge Wood my code is below var targetSite = new Uri("https://hello.com//teams/Worldwide_Site"); ...
1
vote
1answer
383 views

How to access the data from Manage User Profiles?

We are have sync the SP with AD using Active Directory Import for SharePoint 2013. All the users have been picked up into the Manage User Profiles and new user properties have been added to the ...
1
vote
3answers
2k views

Using CSOM to get list item count for multiple lists

I am trying to create a function which should loop through all lists on current web and display their current item count. My code so far: <!-- language: lang-js --> ZN.updateDocumentCount = ...
1
vote
2answers
621 views

Access denied, from an app, when getting List items from a different web applcation

I have create a SharePoint Hosted App and installed on a Site which is located on WebApplication1. This app tries to get list items from a list in a site which is located on Webapplication2. I have ...
1
vote
1answer
1k views

Get web part Id with javascript client OM

Do you know how to get the current web part Id with the javascript client OM API ? Or an idea for a work-around ? Thanks
1
vote
3answers
377 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 ...
1
vote
2answers
7k 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 ...
1
vote
2answers
3k views

Using JavaScript Client OM gives error “ExecuteOrDelayUntilScriptLoaded was not defined”

I have: IN THE HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> ...
0
votes
2answers
565 views

Cascading lists drop-downs in SharePoint Designer (no server-side code) without postback

I've created cascading drop downs populated from SharePoint lists, by following this post by Lars in SharePoint designer without using code, it works fine, my issue is that the secondary drop down ...
0
votes
1answer
209 views

Anonymous Users and managed navigation

I have a custom javascript that builds an extra navigation menu from a Managed Navigation termset. Currently this is using JSOM and is great - when a user is logged in. The problem is anonymous ...
0
votes
1answer
321 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
333 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
1answer
98 views

SP2013 App icon not rendered, only App link is displayed + how we can set the sliding transparent hover text over App icon?

I am facing an App Icon related issue. I am creating SharePoint Hosted App which I am deploying to SP 2013 Developer site. By default any app will have the AppIcon set under Images folder. Also it is ...
0
votes
2answers
1k 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
628 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
487 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
4answers
2k views

How to verify in Javascript Object Model if a List Exists

How can I verify if the list I'm trying to retrieve in Javascript really exists? My code is: function Search() { var context = SP.ClientContext.get_current(); this.site = context.get_site(); ...