Tag Info

Hot answers tagged

2

Since you don't need to use the SPServices library, you can accomplish this via REST and the moveTo() method. The following should work: var url = "/_api/Web/Lists/getByTitle('My List Name')/Items", qs = "?$filter=Attachments eq 1&$select=ID,Author/Title,*&$expand=Author"; $.ajax( { url : siteUrl + url + qs, type : 'GET', headers : { ...


2

Create a new custom Content Type with base as Document Set. Add the two Site columns Reference Number and Customer Name to that particular content type. In custom Document Set content Type , go to Document Set Settings and make the 2 columns as shared. Now all the documents inside the document set will share the value for that 2 columns. also go to the ...


2

Try giving "Read" permission to "Web" in AppManifest.xml and it should work.


2

Few changes here...Add the DisabledEvents class and allow unsafe updates. Also if you set the properties.ErrorMessage, it will show in the UI if there is an issue. public override void ItemUpdated(SPItemEventProperties properties) { base.ItemUpdated(properties); try { using (DisabledEventsScope scope = new DisabledEventsScope()) ...


2

I would use the Content Search Web Part. Using search is better than querying the list directly. Here is an example of setting up a Content Search Web Part Then you can set the search query to filter on the path of the item Path:[urloflist]/forms/dispform.aspx?id=[id] Then use one of the OOB display templates, or, if you prefer, create a custom display ...


2

ItemAdding event is fired when a file is uploaded to the library. ItemUpdating is fired when custom properties in the form are saved.


2

Their is no such restriction AFAIK, You can create the Blog Sites under Publishing site as well as team sites. But their are other limitation i.e How many sites/subsite you are planning to create, What total size you are thinking about? As per SharePoint 2013 Software Limit total number sites/subsite 250,000 per site collection If your site will go ...


2

Try the below code snippet SPWeb oWebsite = SPContext.Current.Web; SPDocumentLibrary oDocumentLibrary = (SPDocumentLibrary)oWebsite.Lists["DocLib_Name"]; SPListItemCollection collListItems = oDocumentLibrary.Items; foreach (SPListItem oListItem in collListItems) { var strAuthor = oListItem["Author"].ToString(); var author = new ...


2

Since your ultimate goal is to manage visibility of navigation nodes based on user permissions, let me demonstrate another approach (no code solution). How to configure Audience for Navigation nodes: Go to Site Settings -> Navigation select Navigation Heading or Link and click Edit link specify Audience property. The figure below demonstrates how to ...


1

I got a script from this site http://www.mysharepointadventures.com/2011/08/powershell-script-to-display-unique-permissions-for-all-subsites-and-lists/ Syntax: <script name>.ps1 | out-file c:\permissions.txt #Add SharePoint PowerShell SnapIn if not already added if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq ...


1

I would actually use Access to do this... there is a builtin way to quickly do what you want and it can handle large lists fairly easily. Link the two tables into an Access database, then go to the 'Query Wizard' under create and then select 'Find Unmatched Query Wizard.' Select your Documents in the first dialog box, and then your Projects in the second ...


1

Use GroupId="PersonalActions" and Sequence="1000"


1

Improving the code suggested by @wjervis, you can change the header of ajax request to: headers: {          'accept': 'application/json;odata=verbose'      } This way it will return a Json response, that I think it is more easy to handle. You can get the length of the response by doing: data.d.results.length Additionally, you can put one more "expand" ...


1

You seem to have a good handle on a sensible way to organise your departments and locations but personally I wouldn't break inheritance on folders, instead I'd manage access at the Web Level simply because Webs are intended to have some independence for administration and effectively securing content seems to be the most pressing problem here. Don't be ...


1

This is by design and I am not sure why they made it like that. There's a nice workaround with calculated columns that can query this column http://gunnarpeipman.com/2007/10/filtering-sharepoint-calendar-by-start-time/


1

You can use the REST endpoints available under SP.UserProfiles.PeopleManager For current user the URL will be like http://siteurl/_api/SP.UserProfiles.PeopleManager/GetMyProperties You can then select the list of properties you want using select http://siteurl/_api/SP.UserProfiles.PeopleManager/GetMyProperties?$select=PictureUrl,AccountName Check this ...


1

In best practice scenario, it is true. Dont use this wizard to configure all the services applications. You use the Config wizard very 1st time when you configure a farm and on first server to provision the state services(unchecked all other services applications). Once it completed then on all remaining server don't run it. Once Farm configured then you ...


1

You can use the AlternateCSS property on each site. Which can be set by code or manually but you need to have the publishing feature turned on in order to make it work.


1

This is by design. SharePoint will not remove those libraries. You can manually remove those and it will not cause any problems. Later if you activate the Publishing feature will create those if it doesn't exists.


1

Inside RunWithElevatedPrivileges you should impersonate current user. Something like var userToken = SPContext.Current.Web.AllUsers["domain\\user"].UserToken; using(SPSite site = new SPSite(SiteURL, UserToken)) list.Update(); //Will save the record as the selected user.


1

Using REST you can query this using https://siteurl/_api/web/lists/GetByTitle('List Title')/items?$filter=GUID eq '661f4ac2-180c-43ce-b43c-bd292180bd43' You need to insert a Script Editor WebPart and use below Script $(document).ready(function(){ $.ajax({ url: siteurl + "/_api/web/lists/getbytitle('" + listName + "')/items?$filter=GUID eq ...


1

The project templates in the SharePoint Solutions section do not support remote development while the projects templates in the Apps section do.


1

Fixed it by using the following code: SPFieldUserValueCollection users = new SPFieldUserValueCollection(web, item["Author"].ToString()); foreach (SPFieldUserValue userDetail in users) { SPUser user = userDetail.User; string email = userDetail.Email; }


1

Das I've used a combination of workflows in the past and then used additional functionality to make elements that are a bit tricky - reminders for instance - using other methods. In the past in SP 2010 and 2007, there was a bunch of excellent capabilities which used to add some really useful extra Actions to the options for a SP Designer Workflow - ...


1

SP.Folder.name property is read-only and hence it could not be used in update operation. How to rename Folder using SharePoint 2013 REST The following example demonstrates how to rename Folder using SharePoint 2013 REST API: function executeJson(url,method,additionalHeaders,payload) { var headers = {}; headers["Accept"] = ...


1

clientContext.Load(listItems, "Include(EffectiveBasePermissions, HasUniqueRoleAssignments)"); // Follow the statement above with this if you need special "fields" like // HasUniqueRoleAssignments, EffectiveBasePermissions as well as the normal fields clientContext.Load(listItems);



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