Search This Blog

Saturday, January 24, 2015

SharePoint 2010 – Saving a Custom List as a Template and creating new lists in Template Gallery

Recently a SharePoint 2010 student asked me to demonstrate saving a custom list as a template and then using this template to create a new list. This blog is to answer that request. As usual I will be doing this from the top level site in a site collection so that any list or library in any site within this site collection will have access to it.
I will create a simple custom list and then save it as a template. This will cause the list template to be saved in the List Templates Gallery which exists in the top level site of my site collection.

Let's begin to Create the Custom List in SharePoint 2010

SharePoint 2010 Create The Custom List
From the top level site of a site collection
I CLICK SITE ACTIONS > MORE OPTIONS

Choose Custom List and Create

SharePoint 2010 Choose-Custom-List-and-Create
I FILTER BY BLANK & CUSTOM, CHOOSE CUSTOM LIST, ADD THE NAME OF THE LIST, AND CLICK CREATE

Create Columns

SharePoint 2010 Create Columns image
I CLICK CREATE COLUMN
In this example, I will be using a custom list column, however in many situations, I would choose list settings and then add from existing site column(s) in the event I wanted to use site columns.

Fill Out List Column Form

SharePoint 2010 Fill Out List Column Form image
I CALL THE COLUMN CATEGORY, SELECT CHOICE AS THE DATA TYPE, AND ADD MY CHOICES – MILD, SPICY, HOT, AND ON FIRE
I then scroll down and click OK (NOT SHOWN)

Click List Settings

SharePoint 2010 click list settings image
I CLICK LIST SETTINGS

Save list as template

SharePoint 2010 Save As Template image
I CLICK SAVE LIST AS TEMPLATE

Fill out List Template Form

SharePoint 2010 Fill Out List Template Form image
I FILL OUT THE SAVE AS TEMPLATE FORM AS SHOWN AND CLICK OK
I do not click Include Content because there are no items in the list

Operation Completed Successfully

SharePoint 2010 Operation Completed Sucessfully image
I READ THE MESSAGE AND INSTEAD OF CLICKING OK I CLICK THE LIST TEMPLATE GALLERY LINK

The List Template Gallery

SharePoint 2010 The List Template Gallery image
I CLICK THE WORD RECIPES

Notice The .STP file extension

SharePoint 2010 .STP file extension image
Notice the .stp file extension. If I wanted to I could save this and use it in another site collection.

Create a list from the Template

SharePoint 2010 Create a List From The Template image
I CHOOSE SITE ACTIONS > MORE OPTIONS

Select Recipes Template

SharePoint 2010 Select Recipes Template image
I FILTER BY BLANK & CUSTOM, SELECT RECIPES AND FILL OUT THE FORM AS SHOWN THEN CLICK CREATE
This will create a new list based on the template of Recipes.

Notice the columns, click Add New Item

SharePoint 2010 Notice The Columns Click Add New Item image
I NOTICE THE COLUMNS OF TITLE AND CATEGORY AND I CLICK ADD NEW ITEM
 

Fill out the form

SharePoint 2010 Fill Out Form image
I FILL OUT FORM AND CLICK SAVE IF I WANT TO CREATE A NEW LIST ITEM
That's how you create a custom list template in SharePoint 2010 and then use it to create a new list. This is a great time saver and helps with data consistency. If this were a subsite, you would follow the same steps once the new list template has been saved to the List Template Gallery at the top level site of the site collection.

How to create Web Template in SharePoint 2010 using Feature

Web Templates are introduced in SharePoint 2010 mainly to define site definition as sandboxed solutions. You can create a web template in following manner.
Create SharePoint Project
  1. Open Visual Studio 2010
  2. Click File -> New -> Project
  3. Select “Empty SharePoint Project” under SharePoint -> 2010 category.
  4. Enter Name for the project e.g. SampleWebTemplate.
  5. Click OK.
  6. Select “Deploy as a sandboxed solution” in next window.
  7. Ensure local site is your targeted site.
  8. Click “Finish
Create Element with Feature
  1. Right click on project (i.e. SampleWebTemplate) points to “Add” and click “NewItem
  2. Select “Empty Element” under SharePoint -> 2010 category and name it to SWTSite (Sample Web Template Site)
  3. Above step will create a SharePoint element (Elements.xml) with a feature associated with it.
  4. Newly created feature name is “Feature1”, we must rename it and name it same as Element name (i.e. SWTSite) otherwise we must change DeploymentLocation inonet.xml.
  5. To rename feature, Click on feature1 and Press F2.
  6. Change feature name from Feature1 to “SWTSite”
  7. Open “Elements.xml” Now we need to add few tags in it as shown below.
  8. Add element “WebTemplate”. WebTemplate element has four mandatory attributes,Name (Internal name of site template), BaseTemplateIDBaseTemplateName andBaseConfigurationID are used to define base template on which new template is based on.
  9. Title and DisplayCategory are used for ease. DisplayCategory is tab name under which template will be visible.
  10. Now “Elements.xml” will look like this.
    <?xml version=1.0 encoding=utf-8?>
    <Elements xmlns=http://schemas.microsoft.com/sharepoint/>
      <WebTemplate Name=SWTSite
                   Title=Sample Web Template Site
                   BaseTemplateID=1
                   BaseTemplateName=STS
                   BaseConfigurationID=0
                   DisplayCategory=SWT sites />
    </Elements>
  11. New Web Template is based on an existing web template (which is STS template).
  12. Now we need to copy template’s files and modify them to change whatever in the template. In this example we will not change anything but just re-use the template as is.
  13. Open “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\SiteTemplates\sts” folder
  14. Copy both “default.aspx” and “defaultdws.aspx” into your project folder.
  15. Copy “ONET.xml” from “sts\xml” folder to your project folder also.
  16. Right click on Element(i.e. SWTSite) points to “Add” and click “Existing Item
  17. Select all three files that you copied before (default.aspxdefaultdws.aspx andonet.xml) and press “Add
  18. Make some changes in feature we must set feature Scope to Farm to be able to do this.
  19. Right-click on SWTSite feature and click “View Designer
  20. Change Scope to “Farm
  21. Change Title/Add description of the feature if you would like to, this will appear under farm features.
  22. As an example change title to “SWTSite Feature” and add description “This feature will add new web template based on STS template.”
  23. Important! Make sure three files (default.aspxdefaultdws.aspx and onet.xml) that we added before are also included in deployment.
  24. To ensure this, Click on the file one by one and select Development Type as “ElementFile” whereas Elements.xml will be of type “ElementManifest
  25. Make sure you mark Sandboxed Solution to FALSE in project properties because sandboxed solution cannot be deployed at Farm level.
  26. Deploy your solution. If successfully deployed go ahead otherwise, look through all steps above if you missed something. If you encountered with something un-addressed, please write it in comments so I can update the post and make it more useful for others.
  27. Create new site collection and apply new template.

Friday, January 23, 2015

What’s New in SharePoint 2013 Social – Major Features, Characteristics, and Limitations

I have been playing with Social features and watching SPC12 social session videos, I have been keeping notes especially notable characteristics & limitations of new features. I thought it would be nice to share my notes with general community.
As many of you already know, Microsoft has invested heavily in SharePoint 2013 social features from both Personal level Social platform and Organization level Social platform. User Profiles, My Newsfeed, Following, and Sky Drive Pro are major investments in personal/my social experience while Communities are major investments in group & team focused organization level social platform.
152_1_SharePoint Social
Here are major investments in SharePoint 2013 social and what’s new out there. I am planning to update this article with Social Architecture, What’s under the hood, and new findings as I learn more about SharePoint Social.
User Profiles
  • User Profile Privacy settings are simplified to only me or everyone, no longer manager related visibility settings
  • Populate user profiles – profile picture, first name, last name, preferred name (required for welcome menu), manager (required for organization chart & following people/colleagues info) and other information as needed
My Sites
  • Improved Experience
    • Simplified My site user experience – Unlike SP2010, no longer separate tabs for news feed, my profile, and my site contents
    • Improved Provisioning process and perceived experience – During first time provisioning process, my site allows users to update profile settings while SharePoint setting up the My Site. Better user experience unlike SP2010 where you can’t access My Site until it fully gets provisioned.
  • About me
    • Shows activity feed, basic user information, in common users, organization chart
    • By default, In Common & Org Chart web part doesn’t show on your profile but it does show on another user’s profile view.
  • Newsfeed
    • Aggregated view of activities from the people, content you are following including sites, documents, and tags
      • Posting – You can post pictures & links including document URLs, Use hash tags & mentions
      • Conversations – replies, like, follow up
      • Five news feeds out of box – Following, Everyone, Mentions, Activities, Likes
      • Anything posted on my site news feed is public by default
      • Any activities or replies marked with follow up, gets added to your tasks list
      • You can target only people you are following by specifying @person in the news feed text box. You can’t target @community in posts directly in news feed web part but you can post news feed on the communities where site feed is enabled
      • You can start new conversation only on your profile, You can’t start conversation or new post on someone else’s wall/profile page like Facebook
    • Architecture
      • All the activities are controlled by privacy settings on user profiles
      • All the activities are stored in the distributed cache along with micro feed list in My Site content database, cached up to 7 days by default in distributed cache, can be changed up to maximum 14 days.
      • Activities stored in micro feed list, it no longer limited to 14 days in SP2010, stores both user generated & system generated activities
  • Following
    • Allows you to follow four different actors out of box – people, documents, sites, and tags, this system is sealed and you can’t customize, add, remove additional actors to follow
    • By default, all the manager, subordinates, and siblings in org-structure are added in following people list
    • You can stop following people, documents, sites, and tags
    • In Office 365
      • It doesn’t seem like If you follow site, any new documents or discussions are added into that site will show up on your following news feed
      • It seems like only activities from people you follow shows up in following news feed
  • Sky Drive Pro
    • User Personal My Site => My documents & Followed Documents
    • My documents are personal private document library, any documents are added in “Shared with Everyone” folder is public to everyone in organization, alternatively you can share personal documents easily and keep track of access – Sharing hint from my site document libraries, which displays all the users and permissions for specific content.
    • Followed documents shows all the documents you follow & suggest which documents to follow
    • When documents are shared, person can visit user’s my site to get access to their documents.
    • You can drag & drop files form your hard drive on my documents library, it requires Office 2013 for drag & drop feature to work, it seems like it doesn’t work for Windows 7 and IE 9
  • Mobility
    • Windows 8 Phone “SharePoint Newsfeed” App allows you to connect to News Feed, User Profile, Following, and Sky Drive Pro documents library
Community Sites
  • Three ways to create community sites
    • Either use community portal site collection or use community site template
    • Additionally, there is a feature can be activated on any existing team site. To activate “Community Site” Site level feature, you must activate “SharePoint Server Standard” Site Collection level feature.
  • Differences between Community and Community Portal Site Template
    • Community Portal Site Collection level Site Template is aggregator of the communities in your environment. It has pre-configured Search driven, Popular Communities web part. There are no Community features activated on the Community Portal site template by default. This is optional but you should have at least 1 Site Collection which can be served as home for Communities from where users can see popular communities and subscribe any communities they want to.
      • Community Portal is added to promoted sites automatically
      • In Office 365 Preview, All the functionality driven by search (e.g. popular community sites) works only for users who are explicitly added as visitors or members of the communities. Adding “All Users” group doesn’t show communities when user visits community portal.
    • Community Site Template is either at the Site or Site Collection level
      • Community Site template provides all the community features like discussion boards, moderations, reputations, and badges.
      • Each community site has about page to describe community purpose.
  • How Community Site differs than Standard Team Site Template?
    • Community Site SharePoint Security groups differs than SharePoint Team Site security groups –  Members Security group in Community Site have Contribute permission level like SP2010 team site whereas SP2013 team site members have Edit permission, Please note that Edit is new permission level in SP2013
    • New Security group called Moderators added in Community Site with Moderate permission level
    • Only Site Owners and Site Moderators can see Community Administration toolbox – It is special web part with quick links for community management
  • Pre-requisites for Community Features
    • For Office 365 and SharePoint online environment, all the plumbing work is pre-configured for the communities’ features to work.
    • For on-premises environments – Although not required, it is important to configure Search, Managed Metadata, and User Profile services for communities for full feature set.
  • Community Site Architecture – Four Internal SharePoint Lists
    • Categories – Defines discussion categories
    • Discussions List – Hosts all the discussions
    • Community Members – People who follow community
    • Badges – List of all the badges
  • Major Features of Discussion boards
    • MS Forums like discussion boards – Discussions/conversations, likes, ratings, featured post, moderations
    • Posting
      • People can post notes or questions
      • People can specify category
      • People can choose best reply on their own posts
      • People can Use both mentions and hashtag in posts
      • People can post both videos and documents including images, by default, any videos or images posted directly in discussion boards get stored in site assets directory. Plan to have dedicated document library to host all the discussion attachments. To redirect all the attachments to the document library, you must break the Site Assets library permission inheritance and ensure only site owners and site moderators have Site Assets permission. If user don’t have permission to document library, it won’t show up on attachment upload screen. One of the biggest concerns of posting attachments is if you ever delete the post, it would still retain the documents or videos attached to the post. There might be potential cleanup required. Having dedicated document library for posting would really help cleaning up.
    • Conversations
      • People can like or reply, report abuse to moderator (this is not enabled by default)
    • Moderation
      • Moderators can choose best reply or edit the post on behalf original poster, mark as featured post, moderate abuses by either editing or deleting posts etc.
      • Moderation of abuses or report abuses to moderator is not enabled by default. Administrators can enable from the community settings page.
    • Limitations
      • You can’t target posts to the community, you can target/mention on people in the posts, you can’t mention SharePoint security group in your posts
      • All the replies/conversations in discussion board are aligned at one level. Replies are not grouped along with same post or questions in threaded view
      • If Moderator ever updates replies or edit any post, there is no visual indication that moderator has added any remarks or changed reply.
  • Gamification Features – Badges, Reputations based on points
    • Reputations depends on posting, replying, and liking in discussions
    • Leaving the community hides someone from members list but retains their reputations point in case they rejoin and wanted to restore their score
    • Reputations are based on each community, not at the portal level by design, there is no aggregation of reputations score across communities – which makes sense since someone might be more expert on one community, not others
    • Limitations
      • Admins don’t have control on how reputations scored can be adjusted. In future versions/updates, MS will allow moderators to give members credit for other activities and increase reputations score
      • You can’t customize pictures for Achievement level, You can add Level 1-5 text
      • You can add custom badges through Community Tools but you can’t attach any images.
  • Site Feed
    • Instead of having discussions on the site home page, you can have site news feed. You must activate the feature and export the site feed.dwp web part and reimport on the home page.
    • Limitations
      • You can’s target @community in posts in news feed web part, you can target only people you are following
      • One major limitations of having news feed instead of discussion lists on community site is all posts, replies, and likes on the news feed doesn’t count towards achievement/reputations points and top contributors web part.
  • How to implement Community Features?
    • Create a Site Collection based on Community Portal Template
      • Aggregation of all the communities via Popular Communities Web Part
    • Create a Site Collection or Sub Sites based on Community Site Template
      • Create Categories, Badges, and Change Community Settings like Reputations Points as needed
      • Configure Security Groups – Member, Moderators, Visitors
      • Configure dedicated Document Library for Posts attachments, Break the security for Site Assets document libra