Print Version Email Page Add to Favorites Comments Alert Me Add to My Links

Thursday, May 20, 2010

Add additional web-part to NewForm / EditForm

If you want to add any additional web-part to NewForm / EditForm of a List, type &ToolPaneView=2 at the end of the url. Instead of opening a page in SPD, this could prove a handy approach.


Wednesday, November 18, 2009

SharePoint: Export List - Retain Lookup Information

The stsadm.exe works well with site migration. However, it does not offer any option to export a list. Therefore to migrate a SharePoint list you need to do the following procedure:
  1. Create a template from the List you want to export (and include the content in the template), download a copy of the .stp template file created.
  2. Then upload the stp file to the List Templates Gallery.
  3. Create the list from the template you have just created.
Have you ever wanted to copy a list that had a lookup field from a source Web to a destination Web using a custom list template (STP)? Even if the destination Web has a lookup list that exactly matches the source Web, the lookup field will be empty in any lists created using the STP. That is because lookup fields are related by GUID.

This is a common problem with custom list templates. The following steps describe the workaround. Assuming that your destination Web already has a lookup list identical to the source Web. Replace [yourlist] with the name of the list you want to move.
  1. Browse to the source Web's lookup list and choose Modify settings and columns.
  2. Copy the source lookup list GUID from the URL.
  3. Browse to the destination Web's lookup list and choose Modify settings and columns.
  4. Copy the destination lookup list GUID from the URL.
  5. Save the source Web's list that contains a lookup column to the lookup list as a list template called [yourlist].stp.
  6. Export the list template STP from the source list template gallery to the file system.
  7. Rename the [yourlist].stp file to [yourlist].cab so Windows can open it.
  8. Open the file, right click on the manifest.xml file and export it to the file system.
  9. Edit the manifest.xml file; find the source Web's lookup list GUID and replace it with the destination Web's lookup list GUID.
  10. Save the manifest.xml file.
  11. Open a VS.NET command prompt.
  12. Run the makecab command as: makecab manifest.xml [yourlist].stp
  13. Import the new STP into the destination Web's list template gallery. You will need to delete it if it has previously been imported.
  14. Create a new list based upon the new STP file.
The lookup column on the new list should retain all the data that was in the source list.

Wednesday, November 11, 2009

Site Migrations in MOSS

Managing Sites & Site Collections with STSADM
1. Backup a site collection:
stsadm -o backup -url http://url/ -filename .cab

2. Restore a backed up site collection:
stsadm -o restore -url http://url -filename .cab

3. Backup a single site:
stsadm -o export -url http://url/sitename -filename .cab
stsadm –o export –url http://url/sitename –filename .cab –includeusersecurity –versions 4 –cabsize 1024 –nofilecompression

4. Restore a single site:
stsadm -o import -url http://url/sitename -filename .cab
stsadm –o import –url http://url/sitename –filename .cab –includeusersecurity –updateversions 3 –nofilecompression

Here are interesting problem solving solutions based on the above:
  • Move or Copy a site collection: #1 followed by #2
  • Move or Copy a site: #3 followed by #4
  • Convert a site into a site collection: #3 followed by #4 on a top site URL
  • Convert a top level site collection into a site: #3 targeted to the top level URL followed by #4.
  • Break Apart a content database: Use stsadm -o createsiteinnewdb to create a top level URL first, and then use #3 and #4 on that target URL.

Note: Run the STSADM commands with Site Collection Administrator rights account.

Wednesday, September 09, 2009

Indexing pdf documents with Adobe PDF IFilter 6.0 and MOSS 2007

Perform the below steps on either WSS 3.0 or MOSS:
Install iFilter 6.0
  1. Download Adobe PDF IFilter 6.0

  2. Stop the IIS Admin service: Start -> Run -> services.msc -> IIS Admin Service -> Stop
  3. Run the Adobe PDF IFilter 6.0 Setup program to install the filter on the index server.
  4. Copy the ICPDF.GIF file to "[Hard_Drive]:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Images"

  5. Edit the file "[Hard_Drive]:\Program Files\Common Files\Microsoft Shared\Web server extensions\12\Template\Xml\DOCICON.XML"
  6. Add an entry for the .pdf extension.
  7. Perform an IISReset by performing the following: Start -> Run -> iisreset. You could also recycle the SharePoint Application Pools in Internet Information Services Manager.

For MOSS, perform the additional steps:

  1. If you have MOSS 2007 and have enabled Shared Services then, goto Central Administration -> Shared Services Administration -> Select your current Shared Services Provider -> Search -> Search Settings -> File types.
  2. Click New File Type.
  3. Add the pdf file extension in the designated text box and click OK.
  4. Go back to the Search Settings page.
  5. Click Content sources and crawl schedules.
  6. Select the content source, access its context menu, and click Start Full Crawl.

Monday, April 20, 2009

SharePoint: Enable Stack Trace for better Logging Information

SharePoint (WSS 3.0/MOSS 2007) errors sometimes are not descriptive enough or through the generic error message "Unexpected Error occurred".
It doesn't provide more information than this and it does not even log any thing to LOGS or event log or anywhere.
These type of errors could be caused by missing contentplaceholders in your custom master page or any other reason.

To get better information than the "unexpected error" you can turn on stack trace in the web.config of the corresponding web application.

1. For CallStack, change false to true as shown below:
<_safemode maxcontrols="200" callstack="true" directfiledependencies="10" totalfiledependencies="50" allowpageleveltrace="false">

2. turn off custom errors
<_customerrors mode="Off">
Hope this helps anybody trying to debug SharePoint errors.

Friday, January 02, 2009

SharePoint: Migrating Sites from MOSS to WSS 3.0

Sometimes, we need to move back to old days. Last week, I got across a situation, where I had to migrate MOSS site to WSS 3.0 environment. Earlier I thought, backup - restore will do the job, but it was not that straight forward task.
Many of the Features available to MOSS sites are not available to WSS 3.0 and the existence of these features in the host site causes migration effort to fail. Among the Features that should be deactivated on the host site prior to export are:
Office SharePoint Server Enterprise Site and Standard Site Features, which can be deactivated through the SharePoint Products and Technologies user interface by navigating to: Site Settings -> Site Features
However, there are many Features, not visible through the SharePoint Products and Technologies user interface that will cause import failures in this scenario including Features such as:
  • BaseWeb
  • AnalyticsLinks
  • DataConnectionLibrary
  • SlideLibrary
  • RelatedLinksScopeSettingsLink
To deactivate those Features, use the SharePoint Administration Tool (STSADM) deactivatefeature operation prior to the export
STSADM -o deactivatefeature -name BaseWeb -url [url-of-site] -force
STSADM -o deactivatefeature -name AnalyticsLinks -url [url-of-site] -force
STSADM -o deactivatefeature -name DataConnectionLibrary -url [url-of-site] -force
STSADM -o deactivatefeature -name SlideLibrary -url [url-of-site] -force
STSADM -o deactivatefeature -name RelatedLinksScopeSettingsLink -url [url-of-site] -force

Wednesday, October 22, 2008

SharePoint 2007: Image Slide Show Web Part

Most of the times, there is a demand for a web part, which will show the images stored in Images Library created in SharePoint site in a Slide show manner.

Code Download

How to use this Web Part?

This solution is customized to show images from Images Library as well from image URL.
After adding this web part to your site, edit the Custom Properties of web part by clicking edit -> Modify Shared Web Part.
  1. To display images from Image Library named Photos and a Google image, type the below text in Image URLs custom property of web part: Photos;
  2. Choose the Image Transition from the drop down.
  3. Type in the Transition Delay in seconds.
Enjoy the Slide Show!

World Clock