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

learn more… | top users | synonyms

1
vote
1answer
131 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
1answer
139 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 ...
0
votes
1answer
41 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
vote
0answers
41 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 ...
-1
votes
1answer
27 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
91 views

BCS Managed Client Code Get all method instances

When using the class Microsoft.BusinessData.MetadataModel.Entity entity; does anyone know how to get all the External Content type operation method instances so i can dynamically pass the value to ...
1
vote
2answers
65 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 ...
5
votes
4answers
6k views

List API get all items limited to 100 rows

When doing a GET call to the List API from JavaScript: "/_api/web/lists/GetByTitle('ListName')/items" the results returned are limited to 100 rows. Is there any way to return more rows in the result, ...
0
votes
2answers
291 views

How to create a search using sharepoint JSOM

I'm new to SharePoint and JSOM and i'm trying to build up a search using JSOM. and i tried below code snippets I FOLLOWED FOLLOWING BLOG ...
0
votes
3answers
278 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
52 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
0answers
43 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 ...
0
votes
1answer
62 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" ...
1
vote
1answer
73 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
121 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
28 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 ...
1
vote
0answers
45 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
2answers
2k views

How to get value of custom lookup field.?

I have code here, clientContext.load(collListItem, 'Include(Id, Fruits)'); clientContext.executeQueryAsync( Function.createDelegate(this, this.onQuerySucceeded), ...
4
votes
1answer
8k views

How to authenticate user in sharepoint online using javascript

I have a public site on Office 365 SharePoint Online. By default when user clicks on to sign in, it redirect to Microsoft login page. I don't want to redirect user to Microsoft login page. But ...
0
votes
0answers
38 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
48 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
2answers
51 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
71 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 ...
0
votes
1answer
104 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 ...
3
votes
3answers
182 views

Why does .get_title() called from an (SPOnline) App-Web return an incorrect Localized DisplayName?

!! this is NOT about localisation of the App Web Its about getting an incorrect response from the HostWeb when using get_title() !! Can someone please explain me where I go wrong with the testcode ...
0
votes
0answers
132 views

List all workflows with WorkflowServices throws exception. GetWorkflowDeploymentService returns null

I try to list all site workflows. I followed several examples and try to get the workflows by using CSOM and JSOM. This always fails with the error message: Cannot invoke method or retrieve ...
0
votes
1answer
98 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 = ...
1
vote
1answer
1k views

How to check if publishing is on using CSOM?

How to check using CSOM if a web has publishing infrastructure and publishing features enabled?
1
vote
2answers
121 views

Create a Sharepoint wiki page using JSOM

I need to create a Sharepoint wiki page using JSOM, Can anyone guide me to create path? I'm very very new to Sharepoint and eager to learn. I found this but it uses Rest API and didn't find it very ...
0
votes
1answer
80 views

query calender list so user cant book same date and time

Update var context= SP.ClientContext.get_current(); var web = context.get_web(); var list = web.get_lists(); var targetList; function createItem() { targetList = ...
0
votes
0answers
12 views

Check DateRange free Date and time in Calender

I am trying to see if there is already in the calender we say from 2014-11-28 10:00 to 2011-11-29 10:00 an event then displays 5 days before startdate and 5 day after EndDate, display to the user the ...
2
votes
2answers
160 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 ...
2
votes
0answers
16 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
189 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 ...
2
votes
3answers
2k views

SaveBinaryDirect Throws Unauthorized When the Client Object Model Works fine

I have decided to use the SaveBinaryDirect Method to upload documents to the sharepoint site due to not having the request/file size limitations that the client object model has. The application does ...
1
vote
1answer
62 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
56 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
1k 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
2answers
29 views

RequestUsageExecutionTimeThreshold: what doing this property?

Undocumented property: SPClientCallableSettings.RequestUsageExecutionTimeThreshold
0
votes
1answer
101 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
3answers
805 views

SP2013 online : set_formDigestHandlingEnabled Error

I get the error : Object doesn't support property or method 'set_formDigestHandlingEnabled' when I try to get the current SPContext object from javascript code in an Office 365 site. I am ...
1
vote
2answers
79 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
0answers
78 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 ...
0
votes
1answer
111 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 ...
0
votes
1answer
47 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
52 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 ...
1
vote
0answers
42 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
1answer
32 views

Javascript to display defaulteditform in modal dialogue used by sharepoint

Does anyone have the javascript required to display the defaulteditform in the modal dialogue that SharePoint (v2010) displays an edit form in ? I'd like to add this to my html ?
0
votes
1answer
56 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
0answers
86 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 ...