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

learn more… | top users | synonyms (3)

1
vote
1answer
79 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
37 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
20 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
39 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
25 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 ...
1
vote
1answer
34 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
87 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
47 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
37 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
45 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
111 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
180 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
65 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
83 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
22 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
178 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
29 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
42 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
46 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
87 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
45 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
25 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
40 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
60 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
118 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. ...
1
vote
1answer
26 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
13 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
127 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
50 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
45 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
850 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
77 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
28 views

RequestUsageExecutionTimeThreshold: what doing this property?

Undocumented property: SPClientCallableSettings.RequestUsageExecutionTimeThreshold
4
votes
0answers
97 views
+50

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
61 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
137 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 ...
1
vote
2answers
76 views

How to check whether item is being added or updated in PreSaveAction

I am using the PreSaveAction JavaScript function to handle list item add and edit operations. But depending upon whether the item is being added ( newform.aspx ) or being updated ( editform.aspx ) I ...
0
votes
1answer
30 views

WorkManagement API TypeError: this.get_context is not a function

I have one requirement to show the aggregated task list as a webpart in any page of SP 2013 on premise, where user will see the assigned task list directly without going onto my site. After some ...
0
votes
1answer
92 views

Update multiple User Profiles and their properties using CSOM

Is it possible to update multiple user profiles and their properties using CSOM. I have checked the code for SetSingleValueproperty() method, but can't use it for updating multiple properties for ...
1
vote
0answers
37 views

Creating/Updating Folder failing for asynchronous client calls on Update

I am using CSOM to create folders and upload files on a Sharepoint 2013 document Library. I am creating folders and subfolders inside them by calling the code below in a loop and trying to set their ...
0
votes
0answers
78 views

Office365 REST API bad request while saving data to List

In a SharePoint hosted App am trying to save data to my list in Office 365 using REST API below is the code. The problem with this code is it works fine for less values passed (eg: my in my item I ...
0
votes
1answer
77 views

CSOM Iterate all SiteCollection in an SPO Tenant

I am trying to iterate over all site collections in a SharePoint Online Tenant. I found this code on the web and adapted it to my needs: context = ...
0
votes
1answer
43 views

Reset sharepoint lookup with None option using jquery

How to reset the lookup value to None in Editform.aspx page using Jquery. I want to empty the lookup dropdown if text box does not have any value . Here is the code which i have tried.I was able to ...
2
votes
0answers
39 views

Try - Catch CSOM

I am trying to implement try - catch in CSOM - JavaScript, I have the following code: var ctx = new SP.ClientContext.get_current(); var exScope= new SP.ExceptionHandlingScope(ctx); ...
0
votes
1answer
43 views

Paging in CSOM with sharePoint results

how do we implement paging for results after we get results in onSuccess function, I have like this: for(var i = 0; i <results.length; i++){ } But ...
0
votes
1answer
34 views

JSOM request limitations

I'm building a custom navigation for SP2013 that uses termstore to manage the menu items reasonably. This technet article covers basic termstore limitations, but it doesn't touch on the following ...
3
votes
1answer
82 views

Retrieve subsites from site collection sort last modified date using CSOM

I want to retrieve subsites from current site collection. And it should be order by last item modified date. I am able to retrieve subsites by following code : channel_context = ...
1
vote
0answers
40 views

Call Javascript Function After Saving Calendar Item

I am having a script as below:- function getColorValue(aId,atitle) { try{ var clientContext = new SP.ClientContext(); var oWebsite = clientContext.get_web(); var oList = ...
0
votes
0answers
16 views

Exception while retrieving all available Site-Columns Sharepoint Client Model [duplicate]

I'm trying to retrieve all available site-columns from my sharepoint site. This is what I do: ClientContext clientContext = new ClientContext(siteURL); clientContext.Credentials = ...
0
votes
0answers
14 views

Changing DocumentSet Name in RemoteEventReceiver ChangedItemProperties Collection

I have a RemoteEventReceiver listening on ItemUpdating (synchronous event). The EventReceiver is registered to a Document Set Library. Now I want to change some Properties during the event: ...