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

learn more… | top users | synonyms (1)

2
votes
0answers
10 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
1answer
37 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 ...
3
votes
6answers
141 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
9 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
28 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 ...
3
votes
1answer
47 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 = ...
0
votes
0answers
5 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: ...
0
votes
0answers
14 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 ...
3
votes
2answers
82 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 ...
0
votes
0answers
10 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
42 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
30 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 ?
1
vote
0answers
41 views

Update ID field with client object model

I'm trying to create items in a list and set the ID field programmatically (for use in a lookupfield in another list). This works serverside by setting the property ReadOnlyField of the field ID to ...
1
vote
0answers
19 views

How to provision External content Type using CSOM

Is it possible to provision External Content type and list using CSOM? Thanks in advance.
0
votes
2answers
33 views

SP.UI.ModalDialog Namespace or Reference

Is there any server side reference for SP.UI.ModalDialog? What is the reference for SP.UI.ModalDialog for client side? How i reference this in webpart?
0
votes
1answer
38 views

SharePoint 2010 Javascript JSOM creating a List View Web Part using javascript

I was able to follow along and add a Content Editor web part to a page using javascript from MSDN here. I am now interested in trying to find a way to add a List View or Data View web part to a page ...
2
votes
0answers
49 views

Get object of ribbon button in JavaScript

I am trying to access the ribbon button via JavaScript. Below is my code: // Get the page manager var ribbonPageMgr = SP.Ribbon.PageManager.get_instance(); // Get the ribbon var ribbon = ...
3
votes
1answer
74 views

Most efficient way to get all sub sites under a site collection/sub site using JSOM?

For the question lets assume the following site hierarchy Root Site Sub Site 01 Sub Site 0101 Sub Site 0102 Sub Site 010201 Sub Site 02 Sub Site 03 Sub Site 0301 Now if I want to get all ...
0
votes
1answer
72 views

how to search document from sharepoint 2013 document library using c#

i need C# code for to search documents from SharePoint 2013 document library. i was uploaded documents in SharePoint document library now i want to search all uploaded documents by using c# coding . ...
0
votes
1answer
36 views

Cross-Domain Calls in SharePoint - Comparism

Basic Example mysite.mysharepoint.com has clientside code that wants to access a list on mysharepoint.com due to whatever reason. the Same-origin policy forbids this Possible Workarounds SSOM ...
0
votes
1answer
39 views

Using the SharePoint 2010 CSOM to Delete a list

I am trying to delete a list that contains documents using the SharePoint 2010 CSOM and am using the following code: //find the 'Project Documents' library and delete it var list = ...
2
votes
0answers
85 views

GetUserEffectivePermissions returns wrong results

I'm checking the permissions for user on a SharePoint 2013 list: using (var ctx = new ClientContext("http://comtoso.com")) { var list = ctx.Web.Lists.GetByTitle("TestList"); ...
0
votes
1answer
173 views

Get List Item Version History using Client Side Object Model (C#)

I am using the Client Side Object Model Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll against SharePoint 2013, and am able to pull down data from custom lists. What I am ...
0
votes
0answers
33 views

How to perform Insert,update & delete operation on External Content Type by consuming the ECT operation

I am able to perform read operation on external content type using .net client object model (CSOM) but not able to find appropriate resource on Insert, update & delete. i have attached all the ...
0
votes
1answer
40 views

Error handling ClientContext CSOM SharePoint Online

What is the best way to handle errors for ClientContext is there a reference material for errors thrown. When using the HTTPWebRequest you can check the status ie 403, 500. is there anything similar ...
-1
votes
2answers
58 views

Full control user Getting error in recyclebinitemcollection: “Access Denied” in sharepoint 2010 client object model

List spRecycleCollection = new List(); Site collSite = _ctx.Site; RecycleBinItemCollection collRBI = collSite.RecycleBin; ...
0
votes
1answer
30 views

SharePoint 2010 Client Object Model - 401 on SubSite but not root

I am trying to use the CSOM to access data from a root site, then loop through its subsites to get into files that are stored in its lists. When I go to create the ClientContext, it works fine with ...
0
votes
0answers
19 views

How to upload big size file WITH VERSIONS to sharepoint 2010 using managed client object model?

I am having requirement of uploading files to sharepoint using managed client om.for that i tried the code like: byte[] vercontent = webclient.DownloadData(curverFileVerUrl); double ...
0
votes
1answer
54 views

Filter out hidden folder using client object model in sharepoint 2013

I am adding list and library in treeview but it also displaying the "Forms", "Attachements", "Item" hidden folder in treeview. Any one has any idea to hide that folder using client object model? I'm ...
0
votes
0answers
25 views

Microsoft.SharePoint.Client.ServerUnauthorizedAccessException on test server but not in dev

I am trying to save a document in Sharepoint 2013 with the following code; using (var context = new ClientContext(this.SharepointServer)) { // context.Credentials = ...
0
votes
2answers
39 views

REST api Bad Request file replace

I'm using sharepoint REST api using JavaScript to replace a file in a doc library. Here is the url structure I'm using. <!-- language: lang-js --> props.webUrl + "/_api/web/lists(guid'" + ...
0
votes
1answer
40 views

JSOM context newly created id reference when creating more than one item

I am using the COM JavaScript/jQuery to get, create & update some list items. I have two lists and every time I create a new item in one list, the newly created id is something that I want to grab ...
0
votes
1answer
83 views

Client Object Model: How to get the credentials for windows authentication?

In my .Net application I am using Windows Authentication. I need to save a document to SharePoint, and to do this I need to use the Client Object Model with the Microsoft.Sharepoint.Client namespace. ...
1
vote
1answer
48 views

Use GroupBy on ListItemCollection using CSOM

I am trying to do a GroupBy on a bunch of items that I have retrieved using CSOM and when I try do a foreach loop to go through them I get method not supported exception. List contactsList = ...
3
votes
1answer
745 views

Get Library and Folder from document guid (C#)

Information given I am using version 16.0.0.0 of the Microsoft.SharePoint.Client library. There are several different document libraries in the SharePoint site. In code, we are given a list of ...
1
vote
2answers
640 views

How to set field type choice using csom (c#)

I have a field type: Choice (menu to choose from) which is not multichoice. How do I set a value? I have found code for multiple choice but it doesn't seem to work for single choice.
0
votes
3answers
1k views

get current user info using jquery ,REST and com

My goal is to get the login name and picture for the current user. I am using SharePoint 2013 Foundation. I tried three method and non of then worked correctly: This is with jQuery SPServices: ...
0
votes
1answer
48 views

ReferenceError: itemID is not defined (JavaScript)

I'm trying to grab data from an external list using ecmascript. I'm running into a slight problem. I'm not getting an error popup, however, in debugger mode it's referencing the above error message ...
0
votes
1answer
29 views

How to determine authenticated status on client side?

Do you know any syncronous way to get IsAuthenticated status for currentRequest in client side via javascript? I can get current user via client model, but it will be asynchronous. ...
1
vote
2answers
240 views

Refresh sharepoint parent modal dialog on closing child popup

I have a button in a modal popup, on clicking that button another modal popup opens on top of that. Now I want to refresh the containing page of parent modal dialog on closing child popup. my code ...
1
vote
1answer
71 views

Client object model: orderby in camlquery doesn't work

I have a list on SharePoint 2010: (only showing the first item) How can i get that list alphabeticly? I use a camlquery to try this but it doesn't work. I do get the list but it is in a random ...
1
vote
1answer
162 views

Proper way to call multiple functions using SP.SOD.executeFunc

I need to make sure sp.js is loaded before I call several functions. I currently call them as follows in SP 2013. It works, but I suspect there is a better/more efficient way. ...
0
votes
2answers
103 views

How to get all subsites using ClientContext Object in SP 2010

I need to find all the subsites of particular sites and fill the drop down using ClientContext Object
0
votes
1answer
33 views

How to fill drop down dynamically using ClientContext object in sharepoint 2010

I need to fill the dropdown from the sharepoint list using ClientContext object.
0
votes
1answer
165 views

An error “The remote server returned an error: (403) Forbidden.” [duplicate]

Below is the code and I am getting error in context.ExecuteQuery(); using (ClientContext clientContext = new ClientContext(url)) { NetworkCredential credentials = new ...
0
votes
2answers
156 views

Loading image freezing with Javascript Object Model and jQuery Promises

I have some code using the javascript object model to get items for several dropdown boxes on a form. I also heard that using Promises was the way to go for speeding up things and created 2 wrapper ...
0
votes
1answer
99 views

JSLink Client-side rendering

I need to render some fields client-side, I followed this guide: Client-side rendering but this code is not working: (function () { // Create object that have the context information about the ...
0
votes
0answers
45 views

Run MVC App with Sharepoint as backend for Document Storage

My company has a small sharepoint site that we're hosting. We are almost exclusively using it for document storage, and we don't have very many documents. At the same time, we are developing an MVC ...
0
votes
0answers
46 views

Upload/ download multiple documents to library It need to upload in each folder for an ID…

I need to upload multiple document form .net Aspx page to SharePoint document library. In .net having a multiple record, For Each record having the Multiple file upload option having different ...
0
votes
0answers
80 views

Document Set created using SPServices shown as folder in WelcomePageView

After creating Document Set programatically using jQuery SPServices, if i click on Document Set Name it showing AllItems.aspx page instead of default docsethomepage. I checked in the Welcomepage view ...