Tag Info

Hot answers tagged

2

In SharePoint 2013 was introduced new permission level Remote Interfaces Permission that in particular prevents anonymous users from accessing CSOM interface. How to enable CSOM for Anonymous Users Go to Central Administration Go to Manage Web Application Select your Web App Click on Authentication Providers in the ribbon Click zone "Default". Uncheck ...


2

These other answers tend to be too simple or way too complicated... ;) This should do what you want, you just might need to change the url variable and the select parameters to conform with your environment -- but I took my best guess based on the information you provided. You could also remove the jQuery reference if your page already has it. Here is a ...


2

Option 1. Get List by Url The below solution demonstrates how to retrieve List by its Url, it consists of two steps: Get List Folder using Web.GetFolderByServerRelativeUrl by specifying List Url Get List by specifying List id from Folder vti_listname property Code: '1 step. Get List Folder Dim listUrl As String = "/kb/Pages/" Dim listFolder As Folder = ...


2

It seems it occurs since sp.js library that contains SP.ClientContext class is not yet loaded when your code runs. Use SP.SOD.executeFunc to ensure that the specified sp.js library is loaded when the code runs. Try to change ApproveRejectRDA function to enclose it in SP.SOD.executeFunc like this: function ApproveRejectRDA(id, approved) { ...


1

It seems that sp.js is not yet loaded when SP.ClientContext is being called. Use SP.SOD.executeFunc to ensure that the specified file that contains the specified function is loaded and then runs the specified callback function. You could try to enclose your code like this: SP.SOD.executeFunc('SP.js', 'SP.ClientContext', function() { var webUrl = ...


1

You can query SiteUserInfoList to get all users in a site. ClientContext clientContext = new ClientContext("http://your site/"); Web web = clientContext.Web; List siteUserInfoList = web.SiteUserInfoList; CamlQuery query = new CamlQuery(); query.ViewXml = ""; ...


1

You can try following: Web web = context.Web; List siteUserInfoList = web.SiteUserInfoList; context.Load(siteUserInfoList); context.ExecuteQuery(); This way you can get all users.


1

You can't do that with 2010 client object model but it is now possible with 2013. You can use Server object model or Powershell to add users to site collection administrator group. Another option would be create a custom webservice to add users to that group.


1

This should do it. But you have to use jQuery and SPServices in order to make it work. You can create a simple HTML Select (If the options will not increase) or just can populate using SPServices in case that you list keeps growing. HTML: <select id="dropdown"></select> JS: <script ...


1

How to create a Wiki page via CSOM /// <summary> /// Create Wiki page /// </summary> /// <param name="pagesList">Wiki Pages list</param> /// <param name="pageName">Wiki page name</param> /// <param name="pageContent"></param> public static ListItem CreateWikiPage(List pagesList, string pageName, string ...



Only top voted, non community-wiki answers of a minimum length are eligible