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

learn more… | top users | synonyms

0
votes
1answer
138 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
72 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
67 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
139 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
360 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
58 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
446 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
142 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
118 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
4k 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
394 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
391 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
146 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
200 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
125 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
111 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 ...
1
vote
1answer
172 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
52 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
127 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
162 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
89 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
118 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); ...
-1
votes
1answer
113 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
52 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
146 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
72 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
27 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: ...
1
vote
2answers
58 views

How can I see the fields available for retrieval via get_item()?

I'm using Javascript CSOM to try and integrate a Discussion list into a site I'm working on. However, I can't figure out what Discussion item fields are available for me to access via get_item(). I ...
0
votes
0answers
37 views

Distinguishing between SharePoint Instances

I need to distinguish between unique SharePoint Instances in my provider-hosted App. I used to determine them on the Host-Url like that: initializeSharePoint(Request["SPHostUrl"]); // Interactions ...
0
votes
1answer
48 views

JSOM function not getting called

I have two functions in my js file. Each function is used to fetch data from list. The first function is called as: jQuery(document).ready(function () { SP.SOD.executeFunc('sp.js', ...
0
votes
3answers
303 views

JSOM: Why web.lists.GetByTitle('myList') does not throw exception while web.Title throw exception

In JSOM, we can not access a property of an object before load and excecute. But I don't understand why code 1 works and code 2 doesn't: Code 1: Here I am accessing the List property of web var ...
1
vote
0answers
71 views

How to execute a SQL Agent Job on a button click in a Web Part page of a SharePoint 2013 site?

I have a SharePoint 2013 on-premises site. The requirement is to add a button to one of the Webpart pages and on click of that button, a sequence of 3 consecutive SQL Server Agent jobs will be ...
0
votes
2answers
107 views

Forms Authentication in Sharepoint 2013, _vti_bin/authentication.asmx error

I'm getting this error when using CSOM in a FBA web application that is configured agains't a custom FBA provider. I'm getting this error when site is configured for Forms, if a disable forms with ...
0
votes
0answers
90 views

Requested value 'CheckBoxes' was not found

There's a weird thing happening with my Windows application. I have created a Sharepoint utility to automate the creation of content-types and site-columns. At a point where I try to get my available ...
1
vote
2answers
157 views

Create a site-column of type user, multichoice and multiuser using Sharepoint Client Object Model

I'm trying to create site-columns with following types: Text, Note, Number, Choice, User, MultiUser, MultiChoice I've implemented it for all the types except for User, MultiChoice and MultiUser. ...
0
votes
0answers
30 views

Validate unique value for the list item via JavaScript Object Model

Could you please help me with implementing following logic: I need to check new uploading document name with existing documents. If dublicate or simular document exists, it shoud show existing names ...
0
votes
0answers
38 views

How to specify InternalName for a list field in Sharepoint Client Object model

I'm trying to add a field to my current list. This is what I've achieved so far: Field description = list.Fields.AddFieldAsXml( @"<Field Type='Note' Name='DataType' ...
5
votes
2answers
412 views

Reliably get attachments for list item

I'm working with SP2010's SP.js and I need to get all the attachments of a list item. As it's SP2010, I don't have access to SP.ListItem's attachmentFiles property. :( The following code works for ...
1
vote
2answers
92 views

Add a lookup field for a list in Sharepoint Client Model

This is what I've achieved do far: var listCreationInfo = new ListCreationInformation(); listCreationInfo.Title = "New List"; listCreationInfo.TemplateType = (int)ListTemplateType.CustomGrid; List ...
0
votes
0answers
44 views

Prevent NewItem / Edititem dialog from closing on save OR redirect **dialog** on Save

Before reading further, I am specifically referring to an NewItem.aspx or EditItem.aspx opening up in a SharePoint 2013 dialog box. At the moment I am opening a "New Item" and/or "Edit Item" list ...
1
vote
1answer
281 views

Too many automatic redirections were attempted

I am having some trouble when trying to us the SharePoint Client Object Model against a SharePoint 2013 installation. I am attempting to write some code which will allow both the upload and download ...
0
votes
1answer
117 views

Create docx file in document library using JSOM

I have written a script which creates a new txt file into the document library using Javascript. When I change the file extension to docx, it still creates but I'm unable to view the file.. It gives ...
1
vote
2answers
689 views

How to get web part id

This is a follow up question to the one i asked earlier : Reading web part properties using javascript object model In my earlier question I had been able to access the properties using jsom but i am ...
0
votes
1answer
39 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
2answers
70 views

How to handle list item events from client side using JSOM?

My requirement is like - When an item is added to a list, a log should be added to another list? And this needs be done using JSOM. is there a way to achieve this using JSOM?
3
votes
0answers
318 views

Use CSOM with ADFS credentials from Single Sign-On enabled ASP.NET MVC app

I have the following setup: ADFS 3.0, SharePoint 2013 and the custom ASP.NET MVC app. Both SharePoint and MVC app are configured to use Single Sign-On from ADFS, so once user is logged in via ADFS, ...