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

learn more… | top users | synonyms (1)

1
vote
1answer
39 views

SPWeb.AlternateCSSUrl equivalent Client Side Object Model

Does someone know the equivalent of SPWeb.AlternateCssUrl in the client side object model? Thanks
1
vote
1answer
73 views

Syntax for including fields dynamically in CSOM query?

What is the proper syntax for including fields dynamically in a CSOM listitems query? For example, this would apparently work: foreach (string field in fields) { clientContext.Load(items, includes ...
1
vote
3answers
216 views

How to find the current folder through JS COM?

Is there a way to get a reference to the current folder through the JS COM? It doesn't seem as though it can be done with SP.ListOperation. And by current folder, I mean the folder the user is ...
0
votes
1answer
64 views

Custom newfrom (upload a picture and fill in the picture url)

I have to customize an announcement list new and edit form. In the form is there is a Picture Colum. But I don’t want the user to go first to a picture library, upload the picture, copy the picture ...
1
vote
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(); ...
5
votes
4answers
11k 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 ...
0
votes
2answers
959 views

Why does JSLink code associated with a site column fail to render on first load of document library view, but renders successfully on page refresh?

Bit stumped on this one, wonder if anyone can help? I've created some JavaScript which is stored in the Style Library and referenced by the JSLink property of a site column. When I navigate to a ...
0
votes
1answer
660 views

SharePoint 2013 App Part : Dynamically set values for the tool part panel controls on serverside

How can I dynamically fill a dropdown list in a Tool Part panel of a SharePoint 2013 app part? What I want to achieve: User checks a checkbox Dropdown appears The list items in this dropdown are ...
2
votes
1answer
106 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
2answers
4k 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");
0
votes
1answer
114 views

Client Object Model to Retrieve UserProfileAttribute

we can get directly user information by using Server object but how to get this by using Client object model ?
0
votes
2answers
85 views

List of Sites and Subsites in the Given URL

How do I convert this into Client Object Model, please. I have no full SP installed on the Machine. I just need the list of sites and subsites in the Given URL.. public List<String> ...
3
votes
1answer
698 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 = ...
5
votes
3answers
700 views

Create a new wiki page using the 2013 Client Library

I'm using the SharePoint 2013 Client Library and am trying to generate new wiki articles. I'm able to connect, retrieve the web, find the list, but I can't add items. I feel like I need to be using ...
0
votes
1answer
86 views

Taxonomy control in SharePoint hosted app

I am creating an SharePoint hosted app. In that I have to use Managed MataData from my list. In this I am getting the Metadata from my list column to my Taxonomy control. I have find some post but I ...
4
votes
1answer
106 views

Can i use sharepoint 2013 client object model for SP 2010

I am working on a product. Our product is built on top of .NET framework 4.5. We use Sharepoint client object model (v14.0.0.0) for communicating with Sharepoint (both SP 2010 and SP 2013). This works ...
1
vote
1answer
119 views

How to get root of variations by client OM (JS)?

Let say I have sub-sites on my "main site" (which is not root of site collection), like Home sub-site, About, Contact. The "main site" is actually language variation of another site. In another words ...
0
votes
0answers
211 views

How to add and delete items in SP list using multi select box?

My question is that I am using a multi select list box to insert selected data to sharepoint list and I am using ecmascript object model. <select id="dd" multiple="multiple"></select> ...
6
votes
1answer
2k 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
2answers
194 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 ...
0
votes
1answer
130 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
72 views

CSOM Form based authentication Security issue

I'm new in sharepoint development, I was looking for authenticating users via CSOM by using forms based authentication and I found below code. ClientContext ctx = new ...
6
votes
0answers
440 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 ...
1
vote
1answer
114 views

How to get url of file after uploading to document library?

How do you return the URL of a file after it has been uploaded to a document library, using the default upload page? Returning the text from the "inputFile" textbox from the upload.aspx page would ...
4
votes
1answer
1k 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: ...
6
votes
2answers
2k views

How to create SharePoint list with custom template using Managed Client Object Model?

Creating lists in SharePoint using Managed Client Object Model is rather easy task. Here's how to create a list with SharePoint's custom list template: ListCreationInformation lci; List list; lci = ...
2
votes
1answer
456 views

client side people picker validation

I've built my people picker using the normal method for client side: // Render and initialize the client-side People Picker function initializePeoplePicker(peoplePickerElementId) { // Create a ...
1
vote
1answer
104 views

SP2010 Javascript Object Model: programmactially add calculated column to list

I am building lists and adding fields via the following. I am wondering if I can add a calculated field and how you set the formula in this (or another method): function onCreateRootCause() { var ...
3
votes
3answers
1k 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 ...
0
votes
0answers
24 views

How to get “Shared With” count of a list item or document using CSOM

Is there any way to get the count of "Shares" on a list item. I've a requirement to show "share" link along with the share count like "share(10)", Can I do it using javascript?
3
votes
0answers
81 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
2answers
237 views

How do I programatically change the default value of, or remove from default view, title column using javascript?

Using the JSOM in SharePoint 2010, if I am creating lists programmatically using something like: this.myField= oList.get_fields().addFieldAsXml('<Field DisplayName=\'Key\' Type=\'Text\' />', ...
0
votes
1answer
50 views

SP2010 JSOM: when creating field using javascript, how to define date only instead of date & time

I create a list using: function createProjectList() { var clientContext = new SP.ClientContext.get_current(); var oWebsite = clientContext.get_web(); var listCreationInfo = new ...
2
votes
1answer
339 views

Get ContentType Name in Client ObjectModel GetItems call

I'm using the SharePoint 2010 Managed Client Object Model to retrieve a list of listitems: string formattedDate = theDate.ToString("yyyy-MM-ddTHH:mm:ssZ"); CamlQuery absenceQuery = ...
1
vote
1answer
527 views

How to access the TermSets of Metadata service using Client Object Model of SharePoint 2010 Programatically?

I want to know how i can find names of the metadata services available on the particular site, and if those services are available. Also how can i access the TermSets of the metadata services using ...
1
vote
1answer
125 views

How can one create a custom list in JSOM based on a custom list template (STP) in 2013?

I have a custom list template (STP) in my list template gallery. I can retrieve the list template using the client object model in javascript. But it's not clear how to create a new list from that ...
2
votes
4answers
183 views

How to retrieve data from one executeQueryAsync and use it in another executeQueryAsync within the same ClientContext

I want to add item to list where Title is equal to current user ID by JavaScript Object Model. As far as I know I first need to get currentUserID and I wrote the following code currentUser = ...
1
vote
2answers
729 views

Sharepoint 2013 Client Object Model file larger than 2 Mb exception

I am new to Sharepoint and Client Object model. I am stuck with a problem and not been able to fix the issue. I want to upload files more than 10 MB using Client Object Model in Sharepoint 2013. I get ...
4
votes
2answers
679 views

ScriptResx.ashx Not Working

I'm trying to use ScriptResx.ashx in an Application Page I'm building (just to test out the functionality) and every time I try to grab a resource from what should be a JavaScript object, SharePoint ...
3
votes
1answer
136 views

Check- in & check-out files using client object model

As the title says, how can I Check- in & check-out files using client object model?
0
votes
1answer
187 views

How to create sub site context in sharepoint online using app model

I am trying to create a sub-site and some predefined lists in the existed site collection. I am successfully created the sub site in the site. But Now i want to create lists in that newly created ...
1
vote
1answer
405 views

Retrieve Iist Item column values with column names on Item click, JavaScript

I need to retrieve List item column values with column names on item click. In SP2010, I have a XSL which calls the JavaScript. I have sent the list item id through the XSL into the JavaScript ...
0
votes
1answer
103 views

Equivalent of GetRolesAndPermissionsForCurrentUser in SharePoint REST API?

I have this code which is used to check if a user has permissions to access the site or not. jQuery.support.cors = true; $().SPServices({ webURL: sites[index], ...
0
votes
0answers
25 views

set properties for ShimFileCreationInformation object

I am writing some unit test cases using fakes framework. I am using an object ShimFileCreationInformation from Microsoft.SharePoint.Client.Fakes namespace. Now, I pass this object to a function. ...
0
votes
0answers
72 views

Filter/compare two arrays from CAML query

I'm using JavaScript/Client Object Model to retreive some data by CAML query. I've 2 CAML queries. One retrieve all data from a specified column. The other query retrieve data from same column ...
3
votes
2answers
120 views

Sharepoint unit testing using fakes framework

I have an application which uploads a file to SharePoint via client object model. Now I need to write unit test cases for this application. The problem is, I how do I write test cases for the ...
2
votes
4answers
1k views

SP.ClientContext is always “undefined” in JSLink functions

I'm trying to execute CSOM functions as part of a JSLink extension to override rendering of a Lookup Field. Problem is every time I try to access SP.ClientContext it returns as undefined I have ...
2
votes
2answers
106 views

How do I get a collection of document libraries using Javascript CSOM?

I'm working on an UI feature for my SP2010 site and would like to display a number indicating how many documents were added to a specific library since the users last visit. The UI will display a box ...
0
votes
1answer
44 views

Issue when getting library GUID through JavaScript

I'm using SharePoint 2010. I need to get some SharePoint data on a list item hyperlink click. Inside the JavaScript file there is a method getLibraryGuid() I get the targetLibrary value with no issues ...
1
vote
1answer
275 views

SharepointOnlineCredentials not working in an app

I want to authenticate against sharepoint online site using SharepointOnlineCredentials class. Below code works fine in a console application. But the same code is generating error when written in wcf ...