Posts

Showing posts from March, 2014

Custom News feed web part for SharePoint site feed app.

Use the below code to populate and post the feed in site feed app in SharePoint 2013. Note : Enable/Activate Site feed feature in the list of available features var clientContext; var feedManager; var allfeeds; var website; var websiteurl = ""; function populatePosts() {     try {         SP.SOD.executeFunc('sp.js', 'SP.ClientContext', sharePointReady);     }     catch (ex) {         alert(ex);     } } function sharePointReady() {     clientContext = SP.ClientContext.get_current();     website = clientContext.get_web();     clientContext.load(website);     clientContext.executeQueryAsync(onRequestSucceeded, onRequestFailed); } function onRequestSucceeded() {     // Ensure that the SP.UserProfiles.js file is loaded before the custom code runs.     websiteurl = website.get_url();     SP.SOD.executeOrDelayUntilScriptLoaded(GetFeeds, 'SP.UserProfiles.js'); } function onRequestFailed(sender, args) {     alert('Error: '

Multiple values into field with Type="UserMulti".

" In order to allow enter multiple values into field with Type="UserMulti" you must set attribute Mult="TRUE" Mult should be TRUE not true or True. for more info:   http://msdn.microsoft.com / en-us/library/ms437580.aspx

Sharepoint 2013 Custom Site Definitions

You can create a site definition with Visual Studio 2012 taking the onet.xml in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\SiteTemplates\PUBLISHING\XML\ as starting point and add your custom features, modules, pages or whatever in it.

Sharepoint 2013 search auto suggest using api.

  Use the below snippet for SharePoint 2013 search suggest.This will only work for authenticated users not for anonymous users.  <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> <asp:TextBox ID="txtSearch" runat="server"></asp:TextBox> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> <script type="text/javascript" >         var j$ = jQuery.noConflict();         var siteCollUrl = "";         SP.SOD.executeFunc("SP.js", "SP.ClientContext", function () {             var clientContext = new SP.ClientContext.get_current();             var site = clientContext.get_site();             clientContext.load(site);             clientContext.executeQueryAsync(Function.cr

Unlock the sharepoint site while powershell command interupted.

Image
1.Execute the below command in content db of a site. UPDATE AllSites SET LifeCycleFlags = 1 WHERE ID = '(your site collection GUID)'   2.In central admin-->management application-->Configure site quotas and lock   Now you can change the option to not locked.