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

learn more… | top users | synonyms

3
votes
6answers
12k views

SP.UI.ModalDialog.RefreshPage from the dialog itself?

I have customized the display form on one of my list. On a webpart page, I have drop a view to this list. When I click on the title of my item, the custom disp form is shown as expected in a modal ...
5
votes
1answer
411 views

SP.UI.Status anonymously inaccessible

Using Office 365 (SharePoint Online) I have stumbled into an annoying thing. Some parts of the JavaScript CSOM does not seem to be accessible when your browse the site anonymously. If Firstly I tried ...
4
votes
1answer
27 views

CSOM: How to get user groups specific to a site and not all the user groups in the site collection?

I am trying to get the list of user groups specific to a site (within a site collection) but the Web.SiteGroups is returning all the user groups at the site collection level, and therefore I am unable ...
0
votes
0answers
8 views

Upload a file in Host web using SharePoint Hosted App

I'm trying to upload a file into /_catalogs/masterpage of the root site using my app. But it seems that I'm unable to access anything outside of my appWeb. uploadFileToHostWebViaCSOM = function ...
1
vote
0answers
318 views

Convert Sharepoint Calendar Recurrence Data from xml to string

I am creating actual/exception events for a SharePoint calendar event recurring instance and I want to convert the RecurrenceData field value which is an xml string to a readable form like "Every ...
9
votes
1answer
5k views

How to get a list of all Choice field options using Client Object Model

How would you get a list of all the possible choices from a choice field (e.g. Task list Priority or Status fields) using javascript client object model?
3
votes
0answers
60 views

Javascript Conflict on Visual Webpart when adding multiple times with different webpart properties on single page

What I am doing: I am retrieving list items from list using javascript as per visual webpart custom property. I have created a dropdown in webpart editor part from where I am getting site url. As per ...
0
votes
0answers
14 views

Update SharePoint List when clicking button on InfoPath form

I have an InfoPath 2013 form that pulls information from numerous sources, including several SharePoint lists. There is a button on the form (NOT the Submit button) that does some work behind the ...
8
votes
3answers
2k views

Get list item “Likes” using JSOM or REST API's?

How can you retrieve a list items "Likes" using the JSOM or REST API's? I know there is the following method: SP.Social.SocialFeedManager.getAllLikers(postId), but in testing I was not successful ...
0
votes
0answers
13 views

SharePoint User Impersonation through CSOM in SharePoint/Office App

I am trying to create an Office App for Word that will have read access to a List in a SharePoint tenant. The goal is to show only the items on the list that are published and within the user's ...
1
vote
0answers
18 views

clientContext.Credentials = CredentialCache.DefaultNetworkCredentials - in CSOM returns 401 unauthorized thru IIS

I am trying to access sharepoint site using CSOM with Windows Authentication. It works if I run it in visual studio on a server. However, it returns a 401 unauthorized when I run the site thru IIS on ...
0
votes
2answers
380 views

Synchronize excel file with SharePoint online list

I want to synchronize data from excel file with SharePoint list on office 365. I have already built a utility which uses client object model to achieve this but it is very slow as item count are in ...
0
votes
2answers
225 views

Enumerate Summary links column values in JS COM

I defined a list where a Summary list is a coloum, in my javascript code i want to read the values of the links one by one... sliderText = listItem.get_item('Description0'); sliderTitle = ...
4
votes
1answer
2k views

System.ServiceModel.ServiceActivationException “A relative URI cannot be created because the 'uriString' parameter represents an absolute”

The client object model code in my application is throwing the following exception. How to solve it?. System.ServiceModel.ServiceActivationException: The service '/_vti_bin/client.svc' cannot be ...
1
vote
1answer
2k views

set multiselect lookup column using jquery

I have a Multi select Look up column which as you all know is a control with two list boxes and "Add or Remove" Buttons. The user populates the right-hand side of the control with some values by ...
5
votes
7answers
8k views

SP.ClientContext is always “undefined” in JSLink functions

I'm trying to execute CSOM functions as part of a JSLink extension to override rendering of a Lookup Field. Problem is every time I try to access SP.ClientContext it returns as undefined I have ...
2
votes
2answers
612 views

Setting SPWeb.AlternateCssUrl via CSOM or JS

According to this Microsoft Office 365 Blog post the SharePoint CSOM (.Net, REST, JS) has been enhanced to support setting SPWeb.AlternateCssUrl: ...
0
votes
1answer
1k views

Client Context executeQuery() works in console app but returns null object when executed from CRM Server

I have the function GetDocumentLibrary which must return a libray from sharepoint site. When I execute it from a Visual Studio Console Application it works and return the library with all ...
0
votes
1answer
468 views

Taxonomy control in SharePoint hosted app

I am creating an SharePoint hosted app. In that I have to use Managed MataData from my list. In this I am getting the Metadata from my list column to my Taxonomy control. I have find some post but I ...
0
votes
2answers
21 views

SharePoint 2010 Client Object Model code for different site - Value does not fall within the expected range

I am trying to fire some real basic CSOM calls by button clicks on an HTML form. The only problem is the form needs to be located on one site and the SP.file objects might be located on another site. ...
1
vote
3answers
1k views

How to create List and libraries with CustomSchemaXml property using SchemaXml with CSOM in sharePoint online2010?

How to create List and libraries with CustomSchemaXml property using SchemaXml with CSOM in sharePoint online2010???? I am using following Code... // Create new list for restore List Item from List ...
4
votes
1answer
3k views

How to get Social Comment in SharePoint 2013 using JavaScript (REST) or Search?

I have added a Noteboard Web Part in my page. Now user is adding comments in Noteboard Web Part. I want those comments count. How can I get it using JavaScript? I am using SharePoint 2013. Is there ...
5
votes
4answers
3k views

Set DateTime (utc) to listitem (CSOM, SP2013)

How to set UTC timezone to a listitem's DateTime field without executing query each time? This would be slow for many datetime fields and items: var utc = DateTime.UtcNow; var localTime = ...
0
votes
1answer
630 views

502 DNS lookup failed error when using SharePoint 2013 CSOM

I am facing an issue while using CSOM in SharePoint 2013. I have configured an alternate access mapping for our site to run on http://mycustomdoamin.net/ The site is running fine and I am able to see ...
0
votes
1answer
938 views

Cannot invoke HTTP DAV request. There is a pending query during OpenBinaryDirect

I've to move some items from one document library to an other one in a different site. I use object client model to do this My issue is having an exception while i'm trying to open the file and here ...
1
vote
1answer
30 views

How to create a list template by using CSOM?

For creating a list template programmatically by using server object, I'm using the SaveAsTemplate() function. SPSecurity.RunWithElevatedPrivileges(delegate { using (SPSite oSPsite = new ...
1
vote
1answer
29 views

Can we distribute SharePoint DLLs with our application

Is my understanding of following page correct that we can distribute Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll with our application? Like we reference these DLLs in ...
1
vote
1answer
550 views

How to get server datetime without postback using JSOM or services

My application page may be long time without reloading, and user changed system date and time. And I need to know datetime from server, not from client.
0
votes
1answer
17 views

Unable to return Microsoft.Sharepoint.Client.File object Names filtered by extension

I'm attempting to retrieve a set of File objects filtered by extension. The following code works correctly (without the filter). FolderCollection productModelFolders = ...
0
votes
1answer
23 views

Getting error from display multiple selected external list item javascript

So here's the javascript I use to display item name of selected item from an external list: <script type="text/javascript"> var targetListItem; function ShowSelectedItems() { ...
1
vote
2answers
619 views

how to update properties of item in doc set with client object model

I've been able to create doc sets and upload files to it with the client object model. I am having difficulty updating the properties of the files in the doc sets. Here is what I've tried: public ...
1
vote
2answers
819 views

Exception calling “ExecuteQuery” with “0” argument(s): "The remote server returned an error: (400) Bad Request. CSOM SP13

I'm trying to add a page to my search centre in sharepoint 2013. Trying out cSOM too. Here is my code, I am getting a bug Exception calling "ExecuteQuery" with "0" argument(s): "The remote server ...
0
votes
4answers
1k 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 ...
0
votes
1answer
1k views

Get a Content Type by Name (Title) using CSOM

I am applying a temporary fix to some CSOM code whilst a more permanent fix is given to me hence I want to create the equivalent of ctx.Web.Lists.GetByTitle("Contoso ...
0
votes
2answers
3k views

how to get list items fields using CSOM

I have to get other column value of list item whose "Title" matches with entered string in text box from the page. I am using CAML query to match "Title". But in Success function, how to get that ...
0
votes
1answer
27 views

Copy SharePoint file from Http to Ftp

Is there a direct way to copy a file from a SharePoint library to an Ftp location? Currently, I'm able to download the document to a local directory using the OpenBinaryDirect method, however this ...
0
votes
1answer
52 views

Can you display all fields from a SharePoint list without writing them specifically?

Is it possible to retrieve every field value of a SharePoint List Item and display them on a web page without specifically calling them individually? I know it is possible to retrieve all the items ...
2
votes
1answer
733 views

Extract text from document in a SharePoint 2013 library

I would like to extract the text from documents stored in a SharePoint 2013 online document library. I have the document loaded using: ClientResult<Stream> data = file.OpenBinaryStream(); ...
2
votes
1answer
1k views

How to open file in adobe reader using command line without checkout from Javascript?

I am working on print functionality. I am printing the PDF files (uploaded in SharePoint Library) using Adobe Reader command line from javascript. I am using ActiveX object to call the cmd. refer ...
1
vote
1answer
672 views

Retrieve Multi-line Text Field with Append Changes in CSOM (Javascript)

I have been looking for an answer to this question all morning and i cannot find anything to point me in the right direction. We have several customizations to a SharePoint page which displays list ...
0
votes
1answer
34 views

Retrieve file version metadata with CSOM

My organization is requiring that we rewrite all of our sandbox solutions as we shift to SP 2013 as provider-hosted apps using CSOM. One of the event receivers I wrote would previously use the ...
4
votes
1answer
1k views

How to get a client context for App in provider-hosted Apps?

I use a provider hosted Apps, so need to work with an App Web and Lists. Could anybody provide a code snippet to get ClientContext() of the App? Can I do something like this? Uri appWeb = new ...
0
votes
1answer
535 views

SharePoint 2013 External Content type. Populate secondary fields

I am trying to migrate data to a document library that contains a external content type using the SharePoint 2013 client object model. The external content type is pulling from a sql server 2012 ...
2
votes
3answers
6k views

REST Adding New List Item

I am currently using office 365 and lots of REST queries to display data. However I am now creating my own forms using bootstrap and JQuery. However, how do I use REST to add the data to the list. ...
0
votes
2answers
787 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
33 views

Check if user has access on site using client object model

Need to check if any user (provided user name) has access to site using c# client object model. It is sharepoint online site. Any suggestions/help is greatly appreciated.
0
votes
2answers
2k views

How to Get User Active Directory Groups in Sharepoint Online

I can't find any documentation or a way to find if a user belongs to an AD group with Javascript neither with the REST API or with the client model JSOM. I have a page in a Sharepoint site and I want ...
4
votes
2answers
2k views

How to get caml query to return list items created by the current user?

I want a caml query that only retrieves items created by the user currently logged in. I tried this specifier = "<Eq><FieldRef Name='AssignedTo'/><Value ...
0
votes
1answer
20 views

Sharepoint App: Create a list using javascript on the host web, list does not appear on site content

So here I am creating a list on a sharepoint app, the app has full control over the host web. I run the code and it does not trigger any exception, but If I check the host site contents, the list does ...
2
votes
1answer
641 views

Copy files/folders between site collection and retaining metadata

I'm using SharePoint 2013 I need to copy files/folders/sub folders from one site collection to different site collection(basically archiving them). I need to do this remotely by using CSOM/JSOM. ...