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

learn more… | top users | synonyms

0
votes
1answer
461 views

how to call executeQueryAsync() to behave synchronously?

Items are saved in jumbled bcoz I am using executeQueryAsync().How to make executeQueryAsync() behave synchronously?
0
votes
0answers
47 views

Display Rating Stars

I have a page and I want to display the items' title of a list with the rating stars for each item beside it in that page. What should I do?
0
votes
0answers
27 views

Term ID by Term name JSOM

I need to do something like this. var termID=getTermIDByTermName('My term Name'); function getTermIDByTermName(name){ var ctx = SP.ClientContext.get_current(); var taxonomySession = ...
0
votes
0answers
96 views

CSOM retrieve List Item doesn't show some Lookup Key Value pairs

I try to load a ListItemCollection from my SiteCollection using CSOM C#. Therefore I use the following List rr = web.Lists.GetByTitle("MyTitle"); context.Load(rr); FieldCollection fcol = rr.Fields; ...
0
votes
1answer
46 views

Sharepoint online 2013, Move term to another branch (parent)

In Sharepoint online we can move Term manually. I need that to be done programatically using JSOM. Does anyone have code for that? I checked ...
0
votes
1answer
25 views

reuseTerm JSOM usage

Anyone familiar with SP.Taxonomy.TermSetItem.reuseTerm(e, d) ? It's there in MSDN and I guess it is to copy a termset to another termset as a sub-term. Any idea?
0
votes
0answers
42 views

Export/Import SharePoint List Template without using Microsoft.SharePoint.dll (Is it possible?)

What I'm trying to do is build a migration tool that when moving from a development environment to production environment for example, any SharePoint List references will be packaged as List Templates ...
1
vote
1answer
194 views

Does audiences work with CSOM?

If we build an SharePoint app and need to show items based on audience targeting, can we use CSOM for that? Can't find any references to it in the CSOM SDK.
0
votes
0answers
29 views

Moving a term to another parent termset JSOM

Hi i need to Move My Term 3 term under My Term 1 (need to make My Term 3 as a child term of My Term 1) using JSOM. I tried many code snippt but i was really unable to do that. Anyone else has tried ...
0
votes
0answers
26 views

Sharepoint 2013 - jcom - How to add function and increment 1 to a specific field?

The following setup is working perfectly for fetching data from my custom list... var items; $(document).ready(function () { SP.SOD.executeFunc('sp.js', 'SP.ClientContext', CustomAction); }); ...
1
vote
1answer
52 views

SharePoint 2013 - JavaScript - List Data fetch failed

I'm using the following to read data from a custom list in SharePoint 2013: var items; $(document).ready(function () { ExecuteOrDelayUntilScriptLoaded(CustomAction, "sp.js"); }); function ...
0
votes
2answers
301 views

Add hyperlink to Sharepoint list item

I need to add a hyperlink to the Sharepoint (2013) list item in one of the columns or make the list item itself as a link. I don't know how to do this. Any help is appreciated!
0
votes
1answer
226 views

Fields validation with Javascript in custom WebPart - SharePoint Online -

I'm currently developing a SandBox WebPart for SharePoint Online (2013) which have two TextBoxes. I'm trying to add the following code for validate the Email and Subject TextBoxes once the Button ...
0
votes
0answers
93 views

Unable to get the list of all SP2010/SP2013 Work Flows (OOTB and SPD) which are associated with a List using CSOM

We came across an issue while pulling the workflow associations of lists, CSOM and Splist.WorkflowAssociations will not list the workflows created through SPD and attached to list. If anyone faced ...
1
vote
1answer
273 views

Enable like function from catalog page via javascript object model - improve this?

The business need is to create a 'channel' page that will display thumbs of videos like a gallery, and I need to enable people to 'like' that content from the gallery page. (Standard disclaimer: I'm ...
1
vote
0answers
55 views

Move terms to another termset/ termstore JSOM

Hi i need to create an app which gets two inputs 1.) Term name 2.) Parent name( term-set or term-store name) once i click on a button, that 1.) term should go under 2.)parent term-set If i put ...
0
votes
1answer
23 views

Can I [safely] change the code name/EntityPropertyName of objects?

We have several lists and columns that we've renamed overtime, and some of the lists/columns also contain spaces. This makes accessing these objects with the EntityProperytName through the CSOM quite ...
0
votes
1answer
50 views

Creating client side solutions

i hear people say they want to create client side solutions in visual studio, would that be applicable in the case of visual web part? if i create a visual web part and only write javascript code in ...
-1
votes
1answer
35 views

CSOM - setting the custom list name, when attempting to receive list data

With the following code, how do I know what list I am retrieving data from? var siteUrl = '/sites/MySiteCollection'; function retrieveListItems() { var clientContext = new ...
0
votes
1answer
51 views

AverageRating is null in JSOM

I am trying to get the rating field from a SharePoint pages library in JavaScript, after using the get_item('AverageRating') it's returning null. My function looks like the following: var ...
1
vote
1answer
227 views

SP.SOD.loadMultiple Issue

I am trying to load the project context in order to access some data. I am using the SP.SOD.loadMultiple function as follows: SP.SOD.loadMultiple(['sp.core.js', 'sp.runtime.js', 'sp.js', 'ps.js'], ...
1
vote
2answers
156 views

How to get termstore GUID by giving its name

I've a term-set called My Term Set, I need to get the Unique Identifier by passing its name. How can i do that? This is the code i have tried so far but it gives undefined Please help me thanks a ...
0
votes
0answers
65 views

Change selected items order and merge using Javascript

I am now able to get the selected list items and merge its contents. Is there a way to reorder the selected items before merge? Or is there a way to get the items in the order in which they are ...
1
vote
1answer
76 views

Deleting file versions except the latest version either using JSOM or SPServices

I want to write script that gets all versions of documents in site and deletes all of them except latest version either using CSOM or SPServices. I have found some information on net but could not ...
0
votes
3answers
324 views

PeoplePicker using JSOM

Hi is there anyway to manipulate PeoplePicker using JSOM. How tho get or set value of PeoplePicker using JavaScript
0
votes
3answers
473 views

How to update Created By Author field in list SharePoint 2013 JavaScript Client Object Model

Just wanting to know how to update a user field, like CreatedBy or Author based on a users name e.g. steven.martin? I seem to have it working fine, from a user id, but not from a user name. get user ...
1
vote
1answer
95 views

Site url exceeds maximum length of 256

I'm trying to create a team site and get the following error message Site url https://myurl/sites/mylongsitename exceeds maximum length of 256. The url itself is under the 256 limit, I've also ...
0
votes
1answer
317 views

How to read terms under a particular termset

I have a termstore like below (sample one) i need to write a JSOM code to get sub terms under a particular term set As an example once i put My term set's uniquie ID i should reterive My term1,2,3 ...
0
votes
1answer
51 views

Sharepoint List Item field returning null using JSOM

Im fetching a field with multiple lines of text using JSOM and it returns null. All other fields return the correct value but attempting to get this results in null. Is there a special way of ...
0
votes
2answers
570 views

Get project custom fields (Project Server)

I am trying to access, in a project detail page, the project context via Javascript to retrieve the data of the custom fields. But my problem is that, when I try to access all the data it only shows ...
0
votes
0answers
51 views

SharePoint 2013: JavaSript Object Model - Inserting 'Reusable Content' programmatically not working

Goal: I am trying to click a button on a page that sets the 'PublishingPageContent' field on another page with data from a 'Reusable Content' list item. Problem: Whenever I go to the updated page ...
0
votes
1answer
102 views

Is it possible to write a CAML query that will update or insert an entry based on its existence?

I'm working with Sharepoint using CSOM and Javascript. I need to cache usage statistics in a List with one entry per user, updating values in a user's list entry when they interact with the site in a ...
0
votes
1answer
122 views

this.get_context is not a function when call getMyProperties

When I call the code below: script type="text/javascript" src="/_layouts/15/SP.js" /script script type="text/javascript" src="/_layouts/15/SP.UserProfiles.js" /script script type="text/javascript" ...
0
votes
1answer
130 views

SharePoint 2013: JavaScript Object Model - Caml Query where list item is selected

How could I use a caml query to only get the list items that are selected using the JavaScript Object Model? <Where> <Eq> <FieldRef Name= ??? /> <Value ...
0
votes
2answers
66 views

Get the title of the item in detailed view (JavaScript)

When I click on an item in a list I get to the detailed view. There I need the title of this item. I could find it in the title of the page (when you look on the tab of your browser) but I think it's ...
0
votes
1answer
37 views

Equivalent of SPRelativeDateTime.GetRelativeDateString in CSOM sharepoint 2013

What is the equvalent API for SPRelativeDateTime.GetRelativeDateString in sharepoint 2013 Client object model using (SPSite site = new SPSite("http://your.site")) { using (SPWeb web = ...
1
vote
0answers
61 views

Creating fields InternalName or StaticName

I'm looking to copy fields and views from one site to another. I get the message that column does not exist and believe its down to when they are created. I'm using the below to create a field ...
0
votes
1answer
111 views

Project Server Get project field value using Javascript

I've been using javascript to access to libraries in a site, but now I want to get the value of a custom field in a project. I've been looking to do this but I've found nothing, clientcontext does ...
2
votes
1answer
318 views

SharePoint 2013: JavaScript Object Model - Create an enterprise wiki page

I have spent a couple of days trying to fix this problem. Goal: - Click a button on an existing page that creates an enterprise wiki page in the pages library and adopts the default custom layout. ...
2
votes
1answer
53 views

Enable item scheduling on a publishing library via SharePoint .NET client API

Does anybody know how to enable item scheduling on a publishing library via code (.NET Client API)? This can be done via the Settings UI for the library in Manage Item Scheduling. However, I can't ...
2
votes
0answers
18 views

Why a pair of FieldRef must be specified for a Join?

I'm writing a small js library to abstract away the annoyance and complexity of creating a CAML query. In that regard, can you explain the significance of both FieldRef elements within a Join, when ...
1
vote
2answers
353 views

PublishingWeb.GetPublishingWeb is not working in SharePoint 2013, CSOM

var pWeb = PublishingWeb.GetPublishingWeb(context, context.Web); context.Load(pWeb); if (pWeb != null) { <This condition is true for Team and Publishing Site ...
1
vote
1answer
114 views

SP2013: JavaScript Object Model - Setting the value of a list field

How do I set the value of a field in a list using the JavaScript object model? I am trying to click a button on an existing page that automatically creates a new wikipage (which I have done) and ...
1
vote
0answers
91 views

How can I increase the allowed execution time for a CSOM Client Context?

I am running SharePoint 2013 and have a Windows app that creates SharePoint sites with CSOM. I have used Powershell to adjust the ClientCallableSettings, lengthening the ExecutionTimeout to 3 ...
5
votes
6answers
3k views

Get a SharePoint ListItem ID from a List where the 'Title' field is a specific value in JavaScript

I am trying to extract the ListItem ID of a List which I am currently NOT in based on a field value in that List. I cant find anything that explains how to do this. So, to explain. I have a Custom ...
0
votes
1answer
297 views

get list item by id using COM sharepoint 2013

I need to get item from list sharepoint by Id I use this code and it give me all the items of the list : <script> function parseURLParams(url) { var queryStart = url.indexOf("?") + 1, ...
0
votes
2answers
31 views

RequestUsageExecutionTimeThreshold: what doing this property?

Undocumented property: SPClientCallableSettings.RequestUsageExecutionTimeThreshold
5
votes
1answer
325 views

SoapException: Possible SOAP version mismatch, accessing SSL enabled site

When I execute the following code: var context = new ClientContext("https://somehost/somesite"); FormsAuthenticationLoginInfo login = new FormsAuthenticationLoginInfo("jesuslogin", "mypassword"); ...
0
votes
0answers
129 views

How to upload display templates via CSOM - “Value does not fall within the expected range.”

I have the following code to upload display templates, but I have this error: [Microsoft.SharePoint.Client.ServerException] = {"Value does not fall within the expected range."} I suppose the error ...
2
votes
2answers
188 views

Creating form based authentication users using client object model

I need to create a considerable number of form based authentication users. I have an Excel spread sheet containing user names and email addresses. I have no permission to execute code directly on farm ...