Skip to main content

Posts

Powershell Script to empty admin recyle bin in SharePoint

a script wherein if we give an user name for ex Deleted By "Bai,Mala(Mala)",it should delete the all the files which were deleted by user. Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue $siteURL = "your site url" $site = New-Object microsoft.sharepoint.spsite ( $siteURL ) $query = new-object Microsoft.SharePoint.SPRecycleBinQuery ; $query . ItemState = “FirstStageRecycleBin” ; $itemcoll = $site . GetRecycleBinItems( $query ); #Delete items those are deleted by Mala $files = $itemcoll | where { $_ . DeletedByName -match "your name" } #Delete output foreach ( $file in $files ) { $site . RecycleBin . Delete( $file . ID) }

Control when a document is displayed: Managing Item Scheduling

How to enable Scheduling Start Date and Scheduling End Date for pages /Documents library for Subsites. 1. After creating new Document library  / pages  go to List Settings. 2. In section General Settings select the link Versioning Settings, and enable" 1) Content approval to Yes . 2) Dcoument version history to created major and minor(draft) version . 3. In Section General Settings select the link " Manage Item Schueduling and select the option Enable scheduling of items in this list . 4. You will see Scheduling Start Date and Scheduling End Date in allitems pages.

Publishing SharePoint List InfoPath Form to a new location

Needed to move it from Dev to Production. File > Publish > Export Source Files. Close InfoPath Go to folder where Source Files are saved, open Manifest.xsf.  Find all instances of the URL and replace them with the new URL - there should be five. If you have secondary data connections, update those also. I use Notepad++ and “replace all” so it just takes a second.  Save the manifest.xsf file and close. Now right click on the manifest.xsf and select Design to open it back up in InfoPath.  Click on File >Publish and verify the URL is correct in the “Publish form to a SharePoint List” section”.

SharePoint 2013 - Suggested Content Browser Locations

In SharePoint Site collection, we can configure “Suggested Content Browser Locations” to access the directories easily. When we configure these locations, we can see them as drop down to the users when we select the content SharePoint. To view this link, we need to activate the publishing feature. We can configure suggested content browser location at site collection level. To configure suggested content browser locations, navigate to Site Settings, in the Site Collection Administration section, click on “Suggested Content Browser Locations” link. We can see the list. Click on new item to create new suggested location link. To check the suggested content browser location navigates to any page, edit the page. Select Insert option. In the Select Asset dialog, We can see the Suggested link drop down as shown the image below.

SharePoint 2013 Autocomplete textboxes using the term store and CSOM

 I am going to use a simple set of terms using state names in the From Sharepoint Deparment.  My terms are included in a group named  Classification  and a Term Set named  City and Department .  Here is what my term store looks like. We then need to add a heap of JavaScript references.  Some of these are included already, but specifically we need to load  SP.Taxonomy.js .  We also need to include  init.js  as I mentioned in an earlier  blog post . < script   type ="text/javascript"   src ="../Scripts/jquery-1.7.1.min.js"></ script > < script   type ="text/javascript"   src ="/_layouts/15/MicrosoftAjax.js"></ script > < script   type ="text/javascript"   src ="/_layouts/15/init.js"></ script > < script   type ="text/javascript"   src ="/_layouts/15/sp.runtime.js"></ script > < script   type ="text/javascript"   s...

Cascading Drop-down in SharePoint 2013

Cascading drop-down to NewForm.aspx  using OOTB . You can also use the example to create 3 level cascading drop-down and as instructed download 2 jquery files and store them in SharePoint library. Then follow the steps. Two jquery files to be downloaded are  jquery-1.3.2.min.js  by jquery.com and  jquery.SPServices-0.6.2.zip  in codeplex by Mark D. Anderson.. 1.         Create List 1: PrimaryDomain 2.         Create List2 : SecondaryDomain  and create a column name it continent (could be lookup to Primary domain list or single line of text)   3.         Create List 3 : SubDomain and Create a column name it Secondarydomian (could be lookup to county list or single line of test) Create 3 columns in list 4. 1.         PrimaryDomain : Lookup to title of PrimaryDomain List 2.  ...