Moving to

Hey folks!

Starting today, I request you all to visit my new blog @

I will no longer be updating the contents at this blog.

Thanks & have fun!!


Site and Site Collection Retention Policy in SharePoint 2013

One of the biggest problem we face in our SharePoint environment is site retention.  Whenever our users request us with new site collections/sites, we tend to ask to them to clear the security test and we create a new site collection or site.  The problem is, managing the site collections/sites.

Lots off users request sites for either long term projects, short term projects, team spaces, etc., and then they tend to forget to manage it.  These sites will reserve a big amount of space, in addition to that is a mailboxes if they have.

So finally, to resolve all the above issues (till certain point), SharePoint 2013 has came to rescue.  The new “thing” called SharePoint Server 2013 Site (or Site Collection) Policy.

As you can see from the above figure, it allows you to create a Site (or Site Collection) Policy which can be applied to restrict site’s long living life.

Site Closure and Deletion

The difference between site closure and site deletion is, site closure means that when the site is put into the closed mode, the site will NOT be active anymore, means the site is not being updated or being actively used.  You can also manually put the site on closure but to reopen the closed site, you will have to go through the site collection administrators.  When the site is being put onto the closure mode, the system will put site into read-only mode as well.  (in this case as well, only site collection administrators will be able to reopen the site).

Though the users/admins/developers can continue using the site as well as it’s contents, whereas site deletion means the site will be permanently deleted with all of it’s content.

Now, sometimes you will have to postpone the above activity, in that case, the site owner can manually delay the site deletion for a particular period of time (assign by the site policy), if not, then the e-mail would be sent to the site owners before deletion of the site and site will be deleted if no action taken.

By using the above technique, you can always apply site collection policies to each and every new site being requested, which will be deleted if not being used for a certain period of time, ensuring you will save space on your server.  This is also helpful when you want to create a site but doesn’t want to allow any changes.

You can put the site into the closure mode, making it a read-only site and avoid the deletion (I wouldn’t recommend that ), once you define the policy to be applied, you can either directly apply it using the publishing feature from the content hub or apply them during the site creation time where in users will have an option to select.  Check out the Configuring Self Service Site Creation in SharePoint 2013.

Once you set it up, you can go to Central Administration -> Self-Service Site Creation Administration and choose from below three options to make it available to the users.

Once applied, the users will be able to choose the policies while requesting a new site.

Thanks & have fun!!

Reference : Steven Boyle

Change List URL in SharePoint 2010

Hey Guys,

You know we always messed up with list names in SharePoint 2010, isn’t it? Yeah, so me too.

Anyways, so I found the solution to change the URL of the List, basically, there are three ways (which I know of),

First of all:

You can use SharePoint Designer 2010

1.  Open your SharePoint Site using the SharePoint Designer 2010

2.  Go to your list node from all items

3.  right click onto the list node and you can rename it

You can use Windows Explorer

1.  Browse any of your document library in the site

2.  From the default view, click on the “Open with windows explorer” option from the ribbon .

3.  In the windows explorer, go to the root folder of the site.

4. From root folder, go to the library or list you want to change.

5. Right click on the folder and rename it.

You can use PowerShell

Open the list from the site and change the root folder of the site:

if($list -ne $null){

$list.RootFolder.MoveTo($list.RootFolder.Url.Replace($oldlistname, $newlistname));
Thanks and have fun!! 🙂

Using LINQ to get roll-up data from SharePoint List (DataSet, DataTable, Excel, etc.)

Hey Guys,

You may find lots of topics and questions posted by [Me] onto the internet for this particular question.

How to use LINQ to get roll-up data?

So, here is the scenario.

I have one SharePoint List as below (you can make DataSet, DataTable, Excel anything you want)

ColumnA     ColumnB      Status

Project1      Task1.1           Completed
Project1      Task1.2           Pending
Project1      Task1.3           Completed
Project2      Task2.1           Completed
Project3      Task3.1           Completed
Project3      Task3.2           Completed
Project3      Task3.3           Completed
Project3      Task3.4           Pending
Project3      Task3.5           Pending

What I need from the above data is:

Project1 66.67 ((Completed Task / Total Task) * 100)
Project2 100
Project3 60

So basically, all I am looking for is rolling up the data and finding the total percentage of project completion.

Easy, huh?

Let’s see, so here’s the code: (Thanks to Paul Choquette)

var returndata = (from geo in dt.AsEnumerable()

orderby geo[“ColumnA”] descending

group geo by geo[“ColumnA”] into itemgroup

select new


Project = itemgroup.Key,

Percentage = (double)itemgroup.Count(i => (string)i[“Status”] == “Complete”) / (double)itemgroup.Count() * 100,


That’s it!!

Let me know in case you want anything more from this code 😉

Have fun!!

SharePoint 2010 Development Series – Part 2

There are two ways we can make a site collection:

1.  Through Central Administration

2.  Programmatically

We show how to create site collection through Central Administration in Part 1 of this article. I’ll explain how to create site collection Programmatically (Using Visual Studio 2010) in this article.

2. Programmatically

1. Click on Start -> All Programs -> Microsoft SharePoint 2010 Products -> SharePoint 2010 Central Administration

2. Under Application Management, select Create site collections

3. Please add the details like Title, Description, URL and site template etc. (See into the screen shots for details)

4. Press OK Button.

5.  After you press OK Button, You will see your newly created SharePoint 2010 Site Collection Successful Message.

6.  Click on URL.

Thanks and Have fun!!

Show/Display Multiple InfoPath Views using InfoPath Form Web Part in SharePoint 2010

Hey Folks!!

I guess I have already answered your question (if you have searched it on search engines 😛 )

That is, How To Show/Display Multiple InfoPath Views?

A little bit of background, I had a requirement where I need to create an InfoPath form with some data.

The catch was, I should create two views, Manager & Employee, and I needed to show the multiple views with direct link to the page.

Usually, you can right click on model dialog page where InfoPath forms opens, right click & copy the URL and directly assign it the way you like it.

But the problem is the InfoPath form will show the tab to switch between the views, also I didn’t wanted the users to switch to the views anyhow.

So, the answer is to use InfoPath Form Web Part

To be continued….

Hide “Search This Site…” in SharePoint 2010

Hey Folks,

So, you want to hide “Search This Site…” Box which is located at Top-Right of the SharePoint Site?


It’s pretty simple!! (Though initially I tried search it a lot and got many different options but none worked!! 😦 )

So Finally, I found a solution which actually worked.


  • Add a Content Editor Web Part (CEWP)
  • Edit The Web Part and click the Source Editor Button
  • Paste the following:
     #SRSB {display:none}

Hide It on all Pages:

  • Use SharePoint Designer to edit your master page and put the above style tag just after the SharePoint style controls
   <SharePoint:CssLink runat="server"/>
   <SharePoint:Theme runat="server"/>
     #SRSB {display:none}
%d bloggers like this: