Sunday, May 24, 2009

How to Retain Filters when Export to SpreadSheet

Share/Save/Bookmark
          Let me explain the title of this article first. We pretty well know that sharepoint has integration with office and as a part it provides "Export to SpreadSheet" option for any sharepoint list. Issue here is after data in the list is exported to excel/spreadsheet the filters are ignored if any applied to the list.When i say filters to list these are applied just by clicking on the list column but not under "Modify View". After crawling on blog network found that these filters are getting ignored with latest version(2007) of office. Still i'm wondering if any custom solution can be done for this. Please comment on this and provide me a solution irrespective of the date of post.

Subscribe

Saturday, May 23, 2009

Feature Stapling in Sharepoint


Share/Save/Bookmark
           Before you pull your extra time to read this article, let us make sure you are reading the right article for your problem.This article address the best approach of customizing the site defintion/templates and gives an insight how sharepoint defines,structures site templates.


CaseStudy: I've a requirement to create some custom sharepoint site definition,just to add some custom links/look to existing templates.So we have two approaches that can be followed here:
1. Edit onet.xml(present in 12 hive folder) of the base site defintion to add customizations - Read here
2. Use feature stapling concept to do it - Best approach

Lets see how the best approach(feature stapling) works, step by step;
feature stapling does need 2 features to accomplish our work.
One feature, staplee that really adds the customizations to our OOTB or custom site defintion
and the other feature, stapler that binds associates the above feature with the site definiton. Bascially we dont need not go into risk of editing onet.xml of site definiton neither stapling does. Thats simple and clean. Did you get a doubt how/when it adds cusotmizations? When ever a site is created based on this site template then the customizations defined in the staplee feature get added to the site .

Create a stapler :
Stapler will have 2 xml files, feature.xml and a manifest xml(here elements.xml)

<?xml version="1.0" encoding="utf-8" ?>
<Feature  Id="82E2EA42-39E2-4B27-8631-ED54C1CFC492"
          Title="StaplingFeatureName"
          Description="StaplingFeatureDescription"
          Version="12.0.0.0"
          Scope="Farm"
          xmlns="http://schemas.microsoft.com/sharepoint/"
          >
    <ElementManifests>
        <ElementManifest Location="elements.xml"/>
    </ElementManifests>
</Feature>

Elements.xml for the above stapler feature is as described as below, where the site template name is associated with the staplee feature(which adds customizations)


<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   <FeatureSiteTemplateAssociation Id="29D85C25-170C-4df9-A641-12DB0B9D4130" 
TemplateName="STS#0" />
   <FeatureSiteTemplateAssociation Id="29D85C25-170C-4df9-A641-12DB0B9D4130" 
TemplateName="STS#1" />
   <FeatureSiteTemplateAssociation Id="29D85C25-170C-4df9-A641-12DB0B9D4130" 
TemplateName="BDR#0" />
   <FeatureSiteTemplateAssociation Id="29D85C25-170C-4df9-A641-12DB0B9D4130" 
TemplateName="SPS#0" />
</Elements>

Here the ID represent the staplee feature where customizations are defined or coded.
TemplateName is the OOTB template name along with config id(optional) or the cusotm name you have given. Say if you want the feature to be associated with all the site templates(different config id's) that are defined under a single template name then just name would be enough with no id.To apply the feature to entite site templates in the farm/sharepoint set TemplateName = Global#0
Click here for all the OOTB site template ids.
Thats great,Now all your customizations are added to the site definitions you want.

Possible scopes for a feature stapler is either Farm or WebApplication or SiteCollection

Subscribe

Monday, May 18, 2009

List of Sharepoint List Template ID's

Subscribe
  • 100   Generic list
  • 101   Document library
  • 102   Survey
  • 103   Links list
  • 104   Announcements list
  • 105   Contacts list
  • 106   Events list
  • 107   Tasks list
  • 108   Discussion board
  • 109   Picture library
  • 110   Data sources
  • 111   Site template gallery
  • 112   User Information list
  • 113   Web Part gallery
  • 114   List template gallery
  • 115   XML Form library
  • 116   Master pages gallery
  • 117   No-Code Workflows
  • 118   Custom Workflow Process
  • 119   Wiki Page library
  • 120   Custom grid for a list
  • 130   Data Connection library
  • 140   Workflow History
  • 150   Gantt Tasks list
  • 200   Meeting Series list
  • 201   Meeting Agenda list
  • 202   Meeting Attendees list
  • 204   Meeting Decisions list
  • 207   Meeting Objectives list
  • 210   Meeting text box
  • 211   Meeting Things To Bring list
  • 212   Meeting Workspace Pages list
  • 301   Blog Posts list
  • 302   Blog Comments list
  • 303   Blog Categories list
  • 1100   Issue tracking
  • 1200   Administrator tasks list

Share/Save/Bookmark