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

learn more… | top users | synonyms

0
votes
1answer
245 views

SP2013 App icon not rendered, only App link is displayed + how we can set the sliding transparent hover text over App icon?

I am facing an App Icon related issue. I am creating SharePoint Hosted App which I am deploying to SP 2013 Developer site. By default any app will have the AppIcon set under Images folder. Also it is ...
1
vote
2answers
389 views

How do I connect to a specific site collection using CSOM and SharePoint Online

I cannot find anywhere to specify what site to connect to when creating a new app for SharePoint online. It seems to default to https://mysite.sharepoint.com, however, I want to retrieve lists from ...
-1
votes
2answers
385 views
0
votes
3answers
531 views

Client object model connect to site with different authentication enabled?

I have a site at SharePoint on-Premises which has both Form based authentication and windows authentication enabled. Users can login using either of them. Now, I try to use Client Object Model for an ...
1
vote
3answers
5k views

Delete Item in Document Library using Client Object Model?

I have custom Database, this Database having SharePoint Item URL like(http://yoursite.com/Shared Documents/a.pdf), so my challenge to remove this file from sharepoint Library using Client Object ...
0
votes
1answer
26 views

Count of documents based on site column content across multiple site collections?

I have a requirement for a dashboard and wondering how to implement in best possible way. I guess CSOM + REST is the only option Requirement: Have multiple site collections with one Document ...
3
votes
2answers
798 views

How to create sub site context in sharepoint online using app model

I am trying to create a sub-site and some predefined lists in the existed site collection. I am successfully created the sub site in the site. But Now i want to create lists in that newly created ...
0
votes
2answers
721 views

Create filtered list view in Calendar using JavaScript/JSOM

I am attempting to create a filtered list view in a Calendar. It is creating everything as appropriate, but not creating the filters. It believe it's my CAML. My goal is to filter by a choice column ...
2
votes
1answer
96 views

Cannot update allowMembersEditMembership

I can't seem to update the setting on a group to allow members to edit members. This is my code: function setGroupsMembershipEditingMode(uri) { var context = new SP.ClientContext(appweburl); var ...
10
votes
2answers
7k 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?
1
vote
1answer
79 views

Unable to get the DisplayName of feature using CSOM

I am trying to get the names of all the features available at site collection using CSOM. Below code works fine to get list of all the Features but i am unable to get the DisplayName property. ...
0
votes
1answer
54 views

Include all non-system fields for listItems from client-side

Usually for retrieve information from list without system fields we've use code like this: clientContext.Load(logWorkItems, items => items.Include( item => item["Hours_x0020_spent"], ...
5
votes
2answers
5k views

Remove “Add new item” functionality from lists

I have lists where the items are created from nintex workflows. I need to prevent the users from adding list items manually, as the workflows ensure dependencies. Revoking the add item permission is ...
0
votes
2answers
325 views

How to Retrieve the shared link of a file Programmatically

I am using C# to programmatically access files on our Office 365 SharePoint site using the Microsoft.Sharepoint.Client.dll. In one of our shared folders all the documents are Shared with anyone with a ...
5
votes
2answers
6k views

SharePoint 2013 get user groups by CSOM

I wrote some code to get the current user groups by CSOM. function getCurrentUser() { this.clientContext = new SP.ClientContext.get_current(); this.oWeb = clientContext.get_web(); ...
3
votes
2answers
1k 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: ...
6
votes
1answer
110 views

(ClientSide) set/update JSlink to CSR files for (all) WebParts, Views, Fields

Working on iCSR.github.io to make CSR development a bit easier. I now want to make it as easy as possible to set the JSlink connections on WebParts, Views or Fields. I have code snippets to do it ...
1
vote
3answers
4k views

how to get sub folder list and how verify the folder name exist or not using CSOM ,C#

i have to verify the subfolder names if not there in that list how to create dyanamically using CSOM and C#
0
votes
2answers
59 views

How we can get the city of current user in sharePoint online

Hi currently i am working on sharePoint online, Where i need to fetch the Current location (city) of the user and on the basis of that i want to get the temperature of that city. using JScript . ...
3
votes
2answers
76 views

How does my app log into hosted Sharepoint (Sharepoint Online/Office365)?

I'm new to Sharepoint generally, and need to write an app which will do some basic file management. First, though, it needs to log in. The documentation I've found suggests that: var clientContext = ...
1
vote
1answer
45 views

HTML Webpart JavaScript works in EditForm.aspx but won't in AllItems.aspx

I have a HTML Webpart with the following code (piece): <script type="text/javascript" src="../../SiteAssets/jquery-1.12.0.min.js"></script> <script type="text/javascript" ...
5
votes
1answer
59 views

Migrate recursive checkbox of calendar from sharepoint 2007 to 2013 programatically

I am trying to migrate SharePoint calendar from 2007 to 2013 programatically. Here is my code. using (ClientContext clientcontext = new ClientContext(targetURL)) { clientcontext.Credentials = ...
1
vote
1answer
7k views

Load properties of list item dynamically in CSOM

I have a situation where I need to load items from the list and which columns to be loaded cannot be hardcoded, as it will be decided on user input. I have the following code: ocamlQuery.ViewXml = ...
0
votes
4answers
1k views

How to get the list item column values based on the html drop down and display in the alert box using Javascript?

I have a html dropdown list(team name) which contains three values A,B,C I have a sharepoint 2010 List A which contains Team name and Email. List A Teamname Email A A@test.com B ...
9
votes
3answers
2k views

Set request access email address through CSOM

In the server side object model it's possible to set the request access email address through the property SPWeb.RequestAccessEmail (MSDN). Since we are moving our SharePoint tenant to Office365 I'm ...
0
votes
1answer
33 views

update list from another list using ECMA/client object model?

I have eleven lists list1,list2,..list10.and listDup Now i want to update ListDup's SID column based on List1's SID . when the time of adding item in List1(List2,List3,..List10) i have to check sid ...
3
votes
0answers
60 views

SharePoint Client Object Model authentication issue

I am using SharePoint.Client to connect to a SharePoint website. The first time it works, but after that I get 401 : Unauthorized error. using (ClientContext context = new ...
1
vote
1answer
2k views

I want to get list of all site collection available on SharePoint Server 2013 using CSOM or REST API but not server object model

I am working on client application for which I don't want to use Server Object Model of SharePoint 2013. I am ready to go for anything other that SOM. I want to get a complete list of site ...
1
vote
1answer
114 views

Upload a Folder with Sub-folders and Files Recursively with Pure CSOM?

Can someone please, share a CSOM (C# only) recursive method for uploading a folder with subfolders and files to a SharePoint Online Library? I know about WebDav and FileExplorer, but it's not a ...
1
vote
1answer
621 views

Looking to retrieve user's groups in SharePoint

I am running SharePoint Foundation 2010. I have a claims based site setup to use a trusted token provider. I am passing it a set of claims that determine the user's group. They look similar to this: ...
1
vote
1answer
74 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' ...
2
votes
0answers
73 views

SP.ClientContext.Load suddenly throwing uncaught TypeError?

I am trying to start a workflow from JSOM. I just had it working fine, and then I had to change some of the other code in the JavaScript file that is unrelated to the client context or executing ...
1
vote
1answer
221 views

Access Items in DocumentSet using JSOM

I'm attempting to access items in a DocumentSet using SharePoint 13's JSOM. I am able to access the generic list properties but I do not see how to access ContentType specific properties on the client ...
0
votes
0answers
9 views

Custom Contenttype data being erased on document check in

I have a process that checks out a document, alters the document, saves a new file with the altered data, and then checks in the document updating the document content with the new file that was ...
1
vote
2answers
2k views

Uncaught TypeError: undefined is not a function

I access my web in javascript code in SharePoint 2013. I'm using Jquery and KnockOutJS for my other functions. So I have added following urls above my code. <script type="text/javascript" ...
10
votes
3answers
883 views

How to access a custom field of a list using REST

I'm trying to get information from a list in a custom SPField called "My Field" with the internal name "MyField" using this JavaScript code: $.ajax({ url: ...
0
votes
0answers
17 views

Refreshing a lookup field in modal edit form via client side javascript

I have a list (list "Project") that on edit of a item opens a modal dialog for editing (editProject.aspx) The Project item has a lookup field "Document links" which points to a custom sharepoint list ...
1
vote
1answer
398 views

Cannot query SP.UserProfiles.PeopleManager from the App Web via REST

I'm testing REST results in the browser with mixed results. The following URL returns the expected result: ...
1
vote
3answers
2k views

Is it possible to change the visual style of a JSGrid row?

I am working on a SharePoint solution using the SharePoint JS Grid control to display data. What I'd like to do is to change the default style (mainly background color) of specific rows in the grid to ...
0
votes
2answers
3k views

SP 2010 CSOM Javascript: serverRelativeUrl fails

I have a custom html and javascript file housed within a document library of a subsite: http://teamsite/project/testing%20site/shared%20documents/test.html and ...
0
votes
1answer
293 views

c# sharepoint 2013 client object model list item attachment update Error: version conflict

my requirement is i need to update the list item values and if list item contains attachments i need to override with the attachments, delete unused attachments from list item. when i am trying to ...
7
votes
1answer
516 views

Set Task list EnableAssignToEmail in CSOM

I would like to set the EnableAssignToEmail bit on a task list via CSOM after a list is created dynamically. I have found a way to do this in Powershell and in code using SPList: Add-PSSnapin ...
4
votes
7answers
10k views

SP.js file not loaded in a simple JSOM example

I am creating a simple example that demonstrates client object model using javascript. I have ceated a simple JS file in Visual Studio and an aspx page using the SharePoint Designer. I have used ...
3
votes
3answers
151 views

Cannot contact site at the specified URL on try ClientContext.ExecuteQuery();

I try to get list from remote SharePoint server using CSOM in .NET Web Application, but ClientContext.ExecuteQuery() return exception Cannot contact site at the specified URL If I try to get ...
1
vote
1answer
697 views

Convert Person/User Group to String

I am retrieving a list that contains Persons and would like to convert them to String, and also be able to count how many users are per list. The Person is retrieved as an Object. How can I solve this ...
2
votes
3answers
6k views

2010: Custom List Template ID

I searched everywhere, but could not find a solution that worked for me. We've created a default document library, changed it a bit and saved it as a new document library template from the user ...
2
votes
0answers
31 views

Desktop application needs to support all versions of SharePoint and SPO

I am connecting to the different SharePoint environments using the CSOM. Whats the best way to deploy the available DLLs to support all SharePoint environments? Do I need to dynamically instantiate ...
3
votes
2answers
8k views

CSOM move the files one folder another folder

I have to all files from one folder another folder using CSOM and C# Thanks for your replay Huge Wood my code is below var targetSite = new Uri("https://hello.com//teams/Worldwide_Site"); ...
0
votes
0answers
27 views

Difference between GetFileByServerRelativeUrl and GetFolderBy… when moving file/folder

I've been trying to create a method that would move a file or a folder. To get the file that I want to move, I am using Web.GetFileByServerRelativeUrl and then on the returned file I invoke MoveTo ...
2
votes
1answer
64 views

Javascript object model says load succeeded, but object is empty?

I've got a pretty weird issue going on on a clients SharePoint 2013 environment. We're using some JSOM javascript code to retrieve details from a web. Here is a snippet of the code: function ...