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

learn more… | top users | synonyms

4
votes
0answers
1k views

Check given user's listItem permissions with SharePoint 2010 Managed Client Object Model (c#)

Is it possible to determine if a user can access a given item identified by its url without the users context - it has to be done with CSOM. Code so far: var file = ...
4
votes
0answers
379 views

Adding an existing app part using the client object model( finding the xml)

I've recently found this nice thread on adding an existing webpart using the csom: Add an existing WebPart Using the Sharepoint client object Model I've tried the same approach for an app part (so an ...
3
votes
0answers
267 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, ...
3
votes
0answers
335 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"); ...
3
votes
0answers
185 views

JSOM working in Chrome but not IE

I am learning the Java CSOM at the moment and have written a little program that creates a sub-site and assigns a masterpage to it. I am embedding all the code directly on the page. I am finding ...
3
votes
0answers
238 views

Replicate AllItems.aspx inline edit in custom page layout

I am attempting to replicate the inline editing features found in the allitems.aspx page in a custom page layout. For whatever reason the "new" and "edit" list options don't seem to be showing up. ...
3
votes
0answers
167 views

How to access Page layouts and site templates using CSOM?

How to access Site Settings > Look and Feel > Page layouts and site templates using CSOM? The page allows end users to change these settings: Subsite Templates: subsites can use any site template ...
3
votes
0answers
302 views

Design Package import SharePoint 2013 using App Installed event CSOM

In SP2013, I am trying to import and export the design package from one site to other site using AppInstalled event using CSOM. I am not able to get the context of source site to import the design ...
2
votes
0answers
70 views

unexpected response from server

I am using javascript to load data from list. But every now and then i get error Unexpected response from server Sometimes i get and sometimes i dont. I googled and someone suggested to free memory ...
2
votes
0answers
79 views

People Picker in sharepoint 2010 in Client Object model

I want to implement a people picker functionality in sharepoint 2010 with Client Object Model (JSOM), how to do it? Actually i have implementated in 2013 but the same code does not work on 2010.
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 ...
2
votes
0answers
100 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); ...
2
votes
0answers
104 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 = ...
2
votes
0answers
404 views

How to properly cache, validate, refresh Access Tokens?

I'm a complete newbie to SharePoint Provider-Hosted Solutions and their authentication logic. My App is an ASP MVC Solution. I run many AJAX-Calls from Client-Scripts to my Controller to interact with ...
2
votes
0answers
57 views

Possible to change view style client-side?

Is it possible to change the view style (for example to Shaded) client-side (using CSOM, JSOM or web services)?
2
votes
0answers
165 views

Creating a navigationnode of type Link from csom

I have a publishing enabled web that I want to add a link to, not a heading. var node = web.Navigation.QuickLaunch.Add(new NavigationNodeCreationInformation { Title = "Dokument", Url = web.Url + ...
2
votes
0answers
128 views

Updating an existing content type field link by JSOM

I have a content type and I would like to set some field links to hidden. The code runs perfectly, but for some reason, when I check in the UI if the field link is hidden, the changes are not applied. ...
2
votes
0answers
96 views

SPListItem.BackwardLinks equivalent in CSOM, JSOM, or REST?

In the Server API for SPListItem there is a property called BackwardLinks that returns a collection of items that link to the item. I don't see the same property in CSOM, JSOM, or REST. Is there a ...
2
votes
0answers
48 views

Client WebPart (apppart), I need to explain some settings

Property element <Property xmlns="http://schemas.microsoft.com/sharepoint/" Name="Text" DefaultValue="Text" Multilingual= "true" | "false" PersonalizationScope="user" | "shared" ...
2
votes
0answers
418 views

Changing the Modified Date of a List Item using the SharePoint Client Object Model (C#) with Contribute Permission

I have a small snippet of code that I use to update the Modified Date of a list item and it works great for users with Full Control permissions. However, for users with just Contribute access to the ...
2
votes
0answers
295 views

SharePoint Online CSOM create managed properties

I'm trying to find a way to deploy search managed properties via script to my Office 365 SharePoint tenant. Previously, for on-prem SharePoint I've achieved this using PowerShell - fairly straight ...
2
votes
0answers
322 views

Windows Authenticated API calls failing when I use a custom sign-in form for FBA

I have a SharePoint 2013 web application configured for both Windows Authentication and FBA (which is working fine). I also have some code which executes a CSOM request using windows credentials, ...
2
votes
0answers
254 views

using sharepoint OOTB DragDrop.js library in Custom webpart

I implemented drag and drop file upload functionality with using REST api in my webpart . But i found an OOTB sharepoint dragdrop.js library which has numerous methods to create drag drop control. ...
2
votes
0answers
488 views

Install an app from the appCatalog using javascript CSOM

I'm trying to install an app in a site from the AppCatalog using the javascript CSOM I get the apps from the App Catalog using req.apps = SP.AppCatalog.getAppInstances(clientContext, oWebsite); I ...
2
votes
0answers
435 views

ssl certificate error when using Client object model

I wrote an app that gets information from some Sharepoint 2010 lists and displays it to the user. It works fine on my development machine.But when I copied the exe to another desktop machine i got the ...
2
votes
0answers
274 views

Dynamically Setting a List View on a WebPart Page

I have been unable to load a page showing a dynamicaly selected View. I can not just display the List itself (Although this would allow me to specify the View in the URL) because I need to modify ...
2
votes
0answers
157 views

Sharepoint Online - How do I retrieve document's social tagging information

Is there any way I can retrieve documents' social tags and notes using Client Object Model? I'm on the client side so I don't have access to Server Objects. I've been searching all around but found ...
2
votes
0answers
153 views

SharePoint Online External Sharing Feature - Available through API?

I have a case where we would like to create a web part for use in SharePoint Online where users can request to share a site with an external vendor. We would like to automate the process of Sharing to ...
1
vote
0answers
18 views

select login name items from list client object model

I don't get the title, or any item in the get_Vote_onSuccess function see below the code: var ctx; var collListItem; var web; var loginUser; $(document).ready(function () { ...
1
vote
0answers
13 views

SharePoint newly created Group's description is not fetched using CSOM

I use below code to get the SharePoint Site group's data. Description of the default groups like owners, visitors were fetched correctly but the same code returns null for newly created group's ...
1
vote
0answers
14 views

How to search in custom metadata columns of document library using QueryService object

I have a SharePoint Library 'Contact' In this library i have created some custom column. Have gone through all the steps of 1st Full Crawl, automatic generation of crawl properties, creation of ...
1
vote
0answers
29 views

Bulk Create folders in document library using client object model

I want to create folder on SharePoint document library using client object model (C#). Below is the code which does that. ContentTypeCollection listContentTypes = list.ContentTypes; ...
1
vote
0answers
52 views

How to load Group.Owner properties using CSOM

When I try to load owner = TargetSite.Web.EnsureUser(grp.Owner.LoginName); I got the exception : The property or field has not been initialized. It has not been requested or the ...
1
vote
0answers
42 views

How to dynamically change the drawing path in Visio Web Access Web Part

I am wondering if there's any way to dynamically change the drawing shown by a visio web access web part. I have multiple drawings I want to show on a page based on what users click on the page. Any ...
1
vote
0answers
189 views

Get inner content of Content editor web part Programatically using CSOM C#

I need to Access Web parts Content Property but it is not available in Web Part Properties when I tried with Client side object model C#. Please find below reference links for detail information. ...
1
vote
0answers
57 views

How to Update/Set Field values by LookUpId in a sharepoint list?

I have a list called ResourceCheckList which contains following columns with lookup fields as below : Here Resource:ID is a lookup column which contains unique ID of another list. So, I want to ...
1
vote
0answers
64 views

SharePoint Online - custom ribbon tab on all pages

Is there a way to make custom tab available on all pages of SharePoint Online website? For SharePoint Farm solution you can register a Delegate Control and activate it on a server side like this: ...
1
vote
0answers
88 views

Set value of summary links column using CSOM in SharePoint 2013

We are creating a custom page where we are providing user a control to add summary links. This is a provider hosted app page and we can't use the SharePoint controls there. So, we are giving the users ...
1
vote
0answers
55 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
vote
0answers
61 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 ...
1
vote
0answers
91 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 ...
1
vote
0answers
48 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 ...
1
vote
0answers
68 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 = ...
1
vote
0answers
61 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 ...
1
vote
0answers
191 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
55 views

How to provision External content Type using CSOM

Is it possible to provision External Content type and list using CSOM? Thanks in advance.
1
vote
0answers
91 views

CSOM object not initialized

I have code that gets group information from a SharePoint Online site using the CSOM API. I want to compare the id of a group with the ids of the associated groups of the web. When the code runs in ...
1
vote
0answers
55 views

Migrating SP2010 List Items to Office 365 creates empty items in O365 [CSOM]

I am trying to migrate SharePoint 2010 list items to an O365 list. But when the code is executed, it creates empty list items in O365 list even though "newItem" has the correct key value pair. Here ...
1
vote
0answers
43 views

Get all social tag terms for documents in a document library

For the project I'm on, we have a component for integration between Dynamics CRM and SharePoint 2013 that's been developed offshore, and I'm currently working on improving the performance of the ...
1
vote
0answers
44 views

Editting a Search Results Web part changing the result source CSOM

I am doing some CSOM powershell to edit a search results web part and change the result source. Don't really know where to start with this as I am new to the world of CSOM powershell. Any help would ...