Wednesday, October 29, 2008

SharePoint Tip of the Month - Closing, Deleting, and Restoring a Web Part

Closing, Deleting and Restoring Web Parts
This month’s SharePoint tip will show users how to manage SharePoint web parts on their site by closing, deleting or restoring them. Below you will find out the difference between these three actions and when it is appropriate to use them.

Closing a Web Part:

When a user temporarily wants to remove a web part from their site, they can simply close them. A web part can be closed by clicking the x button in the top right corner. This will remove the web part from the page; however, it will not delete it. The web part is still loaded on the page, just merely not displayed. This feature comes in handy when and if the user chooses to use the web part again.

Deleting a Web Part:

Should the user want to permanently remove the web part from the site to free up the resources allocated, they will need to delete it. There are two options to do so. First, here are the steps to delete a single web part displayed on the page:
  1. Site Actions -> Edit Page
  2. Click the edit button on the web part of choice
  3. Choose Delete -> OK

If the user would like to delete multiple web parts at once, or delete a web part that has already been closed, they can do so from the Web Part Maintenance Page by following the steps below:

  1. From the main Team Site page, add “?contents=1” to end of the URL string in the address bar window (ex. http://YourSite/Default.aspx?contents=1).
  2. From this page, users can select the check boxes for web parts they wish to delete. Notice, the right hand column specifies whether the web part is currently open or closed.
  3. Choose Delete -> OK

Restoring a Web Part:

Finally, if the user would like to reopen a web part that has been closed, but not deleted, they will need to restore the web part. This can be done by following these simple steps:

  1. Site Actions -> Edit Page
  2. Click Add a Web Part
  3. Click Advanced Web Part Gallery and Options
  4. Click Closed Web Parts
  5. Drag closed web part onto page

Friday, October 24, 2008

Workflow "Error" System Account An error has occurred after workflow completed MOSS 2007

Problem: If you have a "built in" or custom approval workflow setup for your document library. The workflow runs correctly, however when sometimes you look at the workflow status, you may receive an error after the task has been approved and completed such as, Event Type: Error User ID: System Account Description: An error has occurred in [name of workflow].

Resolution: When you define your workflow, there is a section "Post-completion Workflow Activities", where you can check "Update the approval status (use this workflow to control content approval)". If you check this option, and you do NOT have content approval enabled on the library level, you get the system account error message. If you do not check it, everything works fine.

Reason for occurrences: The account listed in the "User ID" column does not have permission to "something" that is being requested in the workflow code. Workflow usually running as the "system account" within SharePoint and should have access to all the objects within SharePoint. However, the system account may not have access to some resources that are outside of SharePoint and needed by the workflow code. Accessing outside resources is usually done via the .NET worker process account (e.g. NETWORK SERVICE).

Thursday, October 9, 2008

Increasing the maximum size of list templates

Saving a list as a template is an easy way of transferring data from one place to another in SharePoint. By default, however, the maximum size of list templates in WSS 3.0 and MOSS 2007 is 10MB.

If you try to save the list as a template that is larger than this you will get the following error:

The list is too large to save as a template. The size of a template cannot exceed 10485760 bytes.

To increase the maximum size, simply run the following stsadm command (from the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN directory) replacing the propertyvalue to the new maximum size (in bytes):

stsadm -o setproperty -propertyname max-template-document-size -propertyvalue 50000000

Points to note:

1.The propertyvalue parameter is in bytes, so the example above will increase the maximum size to approx 50MB.

2.There is a hard limit of 500MB so the value must be less than 524288000 or you will get an error when saving the list as a template.

3.The above increases the maximum size of both site and list templates.