Sunday, November 2, 2008

MOSS 2007 Visio Shapes

Here's a very nice collection of Visio shapes for MOSS 2007. They were created by Tom Short and they can be downloaded from here for free.

Sunday, August 17, 2008

MOSS OOTB Workflows


From Eilene Hao

MOSS 2007 out-of-the-box workflows include:

Approval: Routes a document for approval. Approvers can approve or reject the document, reassign the approval task, or request changes to the document.

Collect Feedback: Routes a document for review. Reviewers can provide feedback, which is compiled and sent to the document owner when the workflow has completed.

Collect Signatures: Gathers signatures needed to complete an Office document. This workflow can be started only from within an Office client.

Disposition Approval: Manages document expiration and retention by allowing participants to decide whether to retain or delete expired documents.

Group Approval: Similar to the Approval workflow, but uses a designated document library and offers a personalized view of the approval process(es) in which a user is participating. This workflow provides a hierarchical organization chart from which to select the approvers and allows the approvers to use a stamp control instead of a signature. This solution was designed specifically for East Asian Markets.

Translation Management: Manages document translation by creating copies of the document to be translated and assigning translation tasks to translators.

Issue Tracking: Manages the issue tracking process by creating tasks for Active issues assigned to users who own to a given issue. When the task related to an issue is complete hence resolving the issue, the creator of the issue is assigned a review task so that the issue can be closed.

Saturday, August 2, 2008

Prompt for User Name and Password, everytime I acess my Sharepoint portal site!

Here's is the way to stop the prompt for username and password everytime you access the Sharepoint portal site:
  • In IE, go to 'Tools'
  • Click on 'Internet Options'
  • Open 'Security' tab
  • Click on 'Custom level'
  • Scroll down and select 'Automatic logon with current username and password'
  • Click ok

Monday, July 7, 2008

MakeCab not updating wsp with updated DLL

This seems to take care of this bug for now. Add the below text to the Pre-build event of your projects:
cd $(TargetDir)
del $(TargetFileName) /q

Tuesday, May 27, 2008

'stsadm -o canceldeployment' when a solution deployment is already under way

If a SharePoint solution deployment fails, yet the timer job is created and not running, you will be unable to redeploy or retract the solution. The retract / deploy buttons will not be present in Central Admin and stsadm will declare that a "deployment or retraction is already under way for the solution". You can find yourself in this state if the “Windows SharePoint Services Administration” service is stopped when you first attempt to deploy, but even after you realise your mistake and start that service, the solution deployment is still stuck.
The answer is hidden in that long list of stsadm operations:
stsadm –o canceldeployment –id

Friday, May 23, 2008

Script to install Server Admin Templates for WSS 3.0 / MOSS 2007

Server admin templates are created as site definitions, providing tighter integration and enhanced functionality within the Windows SharePoint Services platform. They will require a server administrator to install.
List of server admin templates
· Absence Request and Vacation Schedule Management
· Budgeting and Tracking Multiple Projects
· Bug Database
· Call Center
· Change Request Management
· Compliance Process Support Site
· Contacts Management
· Document Library and Review
· Event Planning
· Expense Reimbursement and Approval
· Help Desk
· Inventory Tracking
· IT Team Workspace
· Job Requisition and Interview Management
· Knowledge Base
· Lending Library
· Physical Asset Tracking and Management
· Project Tracking Workspace
· Room and Equipment Reservations
· Sales Lead Pipeline


How to install Server Admin Templates for WSS 3.0/MOSS 2007

Download 20 server templates from here

Create a folder in C:\drive eg. C:\ServerAdminTemplates\
Run ServerAdminTemplates.exe file to extract server templates files in C:\ServerAdminTemplates\ folder.

Copy the follwing command lines in a notepad file to create a batch file.

call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename C:\serveradmintemplates\AbsenceVacationSchedule.wsp" call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "AbsenceVacationSchedule.wsp" -allowgacdeployment -immediate -force call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\ApplicationTemplateCore.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ApplicationTemplateCore" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\BudgetingTrackingMultipleProjects.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "BudgetingTrackingMultipleProjects.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\BugDatabase.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "BugDatabase.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\CallCenter.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "CallCenter.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\ChangeRequest.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ChangeRequest.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\ComplianceProcessSupport.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ComplianceProcessSupport.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\ContactsManagement.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ContactsManagement.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\DocumentLibraryReview.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "DocumentLibraryReview.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\EventPlanning.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "EventPlanning.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\ExpenseReimbursementApproval.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ExpenseReimbursementApproval.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\HelpDesk.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "HelpDesk.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\InventoryTracking.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "InventoryTracking.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\ITTeamWorkspace.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ITTeamWorkspace.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\JobRequisition.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "JobRequisition.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\KnowledgeBase.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "KnowledgeBase.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\LendingLibrary.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "LendingLibrary.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\PhysicalAssetTracking.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "PhysicalAssetTracking.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\ProjectTrackingWorkspace.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ProjectTrackingWorkspace.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\RoomEquipmentReservations.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "RoomEquipmentReservations.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\serveradmintemplates\SalesLeadPipeline.wsp" call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "SalesLeadPipeline.wsp" -allowgacdeployment -immediate -force

call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o copyappbincontent

Run the batch file.
Reset IIS.
Now go to Site Action and click Create Site. You will see list of server admin templates inside "Application Templates" tab.



Wednesday, May 21, 2008

Sharepoint: Email Document from Document Library Context Menu

Excellent feature with a detailed How To:
"By default, SharePoint Document Libraries enable a person to e-mail a link to a document in a document library. This makes sense, because from a security perspective, you want to make sure that whomever clicks on the link actually has access to view the document. SharePoint will take care of authentication, ensuring that person is allowed to view the document. However, someone on Microsoft's SharePoint discussion board presented an interesting scenario: their users don't have direct access to their SharePoint site over their network, so they wouldn't be able to open a link from an e-mail they sent to themselves, to get to that document, because they wouldn't have access to the SharePoint server URL. Intead, they wanted to be able to actually e-mail the document itself from the document library to themselves, so they could read it apart from being on the SharePoint site. "

For full article & code: http://www.beckybertram.com/index.php/2007/10/04/email_document_from_a_document_library

Friday, March 7, 2008

Thursday, February 28, 2008

Sharepoint Developer Guidelines

Interesting & helpful blog article by Eric Shupps

One of the most common mistakes I see new SharePoint developers make is that they jump right into Visual Studio and start writing code without any real knowledge of the environment their applications will be deployed in. They throw together some code, deploy it within a limited context (usually in WSS) on a local machine, do all their testing with an admin account, and then declare themselves to be SharePoint developers. While this sort of slap-dash approach may be fine if you’re just trying to figure the object model out, it creates bad coding habits that will cause all sorts of headaches the first time your web parts are deployed in an enterprise portal environment.

Here are a few guidelines for producing better code, in less time, with more positive long-term results:

1. Learn the Product
To begin with, developers should understand SharePoint before trying to create the next great web part that changes the world as we know it. Investing the time to learn how portal areas are different from team sites, how the data model works, what the differences are between SPSite and SPWeb objects, how, when and why to do impersonation, how data is stored in and retrieved from lists, and getting a handle on the ins and outs of code access security will be time well spent. Furthermore, one needs to work with SharePoint for a while to have an idea of how users are going to interact with the custom web parts being created. How can a person effectively design a portal application if they’ve never struggled with the default navigation controls, created site collections and subsites, managed portal area security, configured search, created custom views, added calculated fields, configured cross-site groups, or put together a basic data view web part? I’m not saying that developers should be admins – that’s not their job – but they sure need to know what they’re working with before jumping in with both feet.

2. Plan for success
It’s a funny thing, but SharePoint development tends to promote a kind of “code before planning” mentality that rarely exists elsewhere in the enterprise. Developers who wouldn’t normally write a line of ASP.NET code without a dozen use cases jump right into web parts without any kind of plan whatsoever. SharePoint’s inherent advantages – unified navigation, managed presentation layer, built-in security model, user-managed hierarchy – aren’t a substitute for a well-designed application framework; in fact, they often work against the developer to emphasize weak design elements and exacerbate poor application design.
Before writing a single line of code, stop and T-H-I-N-K. What’s the right type of project - web part, server control, event handler, or web service? How will the users deploy the application? Will it be used in both WSS and SPS? Does the code require external files, such as XML and XSL, and, if so, where will they be stored and how will they be accessed? What kind of permissions are necessary to execute the various functions in the code? How will configuration parameters be stored and modified? Does the output require a user control or will the HtmlTextWriter class of RenderWebPart be sufficient? Are success/fail messages required in the GUI or Event Viewer? How will you debug and test the application?Finally, plan your code just like you would any other enterprise application. Identify your input elements, output parameters, presentation objects, class definitions, and so forth. Map out the structure and navigation hierarchy. Determine data storage requirements. Create a specification for all the supporting elements – lists, libraries, areas, sites, etc. In other words, treat it like a normal development project and avoid the common mistakes that cause web parts to fail under any conditions other than those used in the proof of concept.

3. Know the Object Model
Nothing is more frustrating than seeing an application that works flawlessly in development get kicked back from QA because the code is dependent upon some quirky object model function. Those handy little methods that look like lifesavers in development – IsRootWeb, DoesUserHavePermissions, GetSubwebsForCurrentUser, ParentWeb – can wreak havoc in a production environment (try using IsRootWeb on a top-level portal area and watch your code get blown to smithereens). Even worse, permission-dependent functions, like GetPermissionCollectionFromWeb, don’t work at all for non-admin users, requiring tricky account impersonation techniques.
The best way to avoid these common pitfalls is to test, test, test in the best simulation of a real-world environment possible. Make sure that the development SharePoint server has accounts for at lest each level of built-in security (and any custom security groups required by the application). Deploy code in the Home area, top-level portal areas, subareas, site collections (parent sites) and subsites. Above all, consider how the user *might* implement the code not how you originally intended it to be used.

4. Log Application Events
Debugging code is no easy task in SharePoint; it’s not always possible to run code on the local development server or virtual machine, the standard error messages are cryptic at best and nearly useless in many instances, and asynchronous code execution (event handlers, for instance) will give even the most seasoned .NET developer nightmares. One simple yet effective method for debugging in SharePoint is to write success and fail messages to the event log during development and testing. Using the WriteEntry method of the System.Diagnostics.EventLog class, developers can bypass the SharePoint safemode parser and STSFLTR ISAPI filter and write messages directly to the event log. This is a handy method for isolating code errors during development; just be sure to remove the event log code before moving into production (although it might be a good idea to leave some level of error logging in the application, especially if it is an event handler or other async process).

5. Code Only as a Last Resort
It sounds strange but writing custom code should be the last resort in any SharePoint deployment, large or small. Think about it – code is expensive to write, deploy, and maintain. In most instances, the original developer isn’t going to be around when the code breaks or fails to run after the latest batch of service packs and updates. No matter how good they are, nobody can fully comment a batch of code so that those who come behind them can just pick it up where they left off. But worst of all, custom code cannot be learned, deployed, managed or improved upon by the average portal user.
Out of the box, SharePoint provides a rich application framework that enables users to create dynamic collaboration spaces without any programming. It never ceases to amaze me how many creative solutions users come up with just using the stock web parts and lists. As developers, our first instinct when presented with a problem is to write code to solve it but users don’t think that way; give them a chance to create a solution on their own and you may be surprised what they come up with, especially once they learn how to use Data View Web Parts. Concentrate on writing code only where it’s really needed so developers can spend their valuable time solving really hard problems without getting bogged down writing throw-away web parts and duplicating built-in functions.

6. Lists Rule
The secret to SharePoint’s power and flexibility is the list object. The reason the product has been so successful where others have floundered (think Lotus Notes and PeachTree) is that it empowers users to create their own data-driven applications without even knowing how to spell ‘database’. But lists are more than Databases for Dummies – they can be a developer’s best friend. Need a datatable to store input parameters? Use a list. Need a sortable, filterable grid to display query results? Lists do it automatically. Need to store/retrieve file objects like XML configuration files? Document libraries have it covered. Need an automated method for launching processes in response to user-driven events? Attach an event handler to a document library.
In SharePoint it’s all about using what you have and not recreating the wheel. If the design includes any sort of data input/output requirements, stop and think how a list can serve this purpose before writing to any XML files in the /bin directory or attaching to an external database. Lists can be a tremendous time saver and, even better, can involve the user in the data management process, requiring less code and generating more interactivity.

7. Don’t Fear the Database
I know this is going to be controversial but I’ve never agreed with the misguided mantra promulgated by SharePoint product managers and evangelists of “Don’t touch the database”. What rubbish. Are we in the business of providing value to the customer or giving sermons on “supportability”? Show me one instance of how reading from the database will blow up a portal and I’ll be glad to reconsider – but I have yet to see one (please note that I am talking ONLY about reading from the database – writing to it directly is a really bad idea and should be strenuously avoided). And before you flame me with a zillion emails on the subject, stop and ask yourself why it’s wrong to read from the SharePoint database but OK to read from the MCMS data store? Is there some evil genie guarding _SITE that’s going to awaken and eat all our lists for breakfast if we query the Webs table? And here’s the real kicker – BizTalk can flood the SQL server with SELECT statements while executing a workflow process but my little navigation control is going to bring SharePoint to a screeching halt??? I think not.
The truth of the matter is that the object model only goes so far. Sometimes the right way to get information to the user is to fetch it from the database; sometimes it’s the ONLY way (think full-blown, drop-down, security-trimmed portal navigation, for instance, or rolling up list data across multiple portals/site collections). Of course, a good developer will follow good data access practices, minimizing redundant calls across the network, closing connections in a timely manner, doing advanced sorting and filtering in dataviews, and so forth. The database is to be respected but never feared; in fact, learning how the data model works in SharePoint can help one to develop richer, more efficient and flexible web parts.
Naturally, these techniques are not a comprehensive guide to developing in SharePoint but they are a good starting point for beginners (and a timely refresher for those with a few web parts under their belts). Learn to be a better SharePoint developer and everyone wins – fellow programmers, project managers, administrators, and, most importantly, the users who have to live with our applications on a daily basis.

From: http://sharingpoint.blogspot.com/2006_05_01_archive.html

Wednesday, February 27, 2008

Disable Warning Message in SharePoint Explorer View

Question:
How do you disable the “Running a system command on this item might be unsafe. Do you wish to continue?” message when using Explorer View in SharePoint.

Answer:
Go to Tools > Internet options in Internet Explorer. Select Security and click Custom level. Under the Miscellaneous section, you will see Launching program and files in IFrame. Change the selection from 'Prompt' to 'Enable'.

Sharepoint 2007 / 2003 document count in Doc Lib

A Sharepoint 2003 document library has 3 files and 2 folders.

A SharePoint 2007 document library has 3 files and 2 folders.

Compare document count in "View All Site Content" and "Documents and Lists":
Sharepoint 2003 indicates 5 documents
Sharepoint 2007 indicates 7 documents

Conclusion: Sharepoint 2007 also counts document in the folders AND subfolders! So after an upgrade to Moss 2007 don't panic if you have more files in SharePoint 2007 than SharePoint 2003.

http://bartvandenheede.blogspot.com/2007/12/count-of-files-and-folders-in.html

Monday, February 4, 2008

MOSS Alerts - Error Troubleshooting

When setting up MOSS Alerts or Tasks you get the following error:
The following users do not have e-mail addresses specified: Username. Alerts have been created successfully but these users will not receive e-mail notifications until valid e-mail addresses have been provided
Set my e-mail address

Troubleshoot issues with Windows SharePoint Services.

Troubleshoot tips:
1) IF Profiles are imported from AD, and you have verified that the user's email address is populated in AD then go on and check to see if you have setup an import schedule for your User Profiles.
- From Central Admin --> Click on Application Management
- Under Office SharePoint Server 2007 Shared Services - Click on Creat or Configure this farm's Shared Services
- Click on the pull down menu on the defaul site and click on Open Shared Service Admin site
- Click on User profiles and properties

- Click start incremental/full import
- After completion of this verify import schedule: Configure profile import

2) If it's only a couple of users it will be easier to just make the change from the site collection
- From Central Admin
- Click on Site Actions
- Then Click on Site Settings
- Click on People and Groups --> All People
- Then click on the user you want to edit
- Edit and enter new email address

Thursday, January 31, 2008

IE Dev Toolbar


A nifty tool, it's Internet Explorer Developer Toolbar. It allows developers to analyze the web pages by exploring the DOM objects, outline tables, divs and other tags, resize images and many other nice features.

you can download it from
here


Microsoft Description:
The Internet Explorer Developer Toolbar provides several features for exploring and understanding Web pages. These features enable you to:
- Explore and modify the document object model (DOM) of a Web page.
- Locate and select specific elements on a Web page through a variety of techniques.
- Selectively disable Internet Explorer settings.
- View HTML object class names, ID's, and details such as link paths, tab index values, and access keys.
- Outline tables, table cells, images, or selected tags.
- Validate HTML, CSS, WAI, and RSS web feed links.
- Display image dimensions, file sizes, path information, and alternate (ALT) text.
- Immediately resize the browser window to a new resolution.
- Selectively clear the browser cache and saved cookies. Choose from all objects or those associated with a given domain.
- Display a fully featured design ruler to help accurately align and measure objects on your pages.
- Find the style rules used to set specific style values on an element.
- View the formatted and syntax colored source of HTML and CSS.
- The Developer Toolbar can be pinned to the Internet Explorer browser window or floated separately.

Thursday, January 10, 2008

Tracking Sharepoint Alerts

If alerts are setup by you or by others then often it is difficult to keep track of which alerts you are subscribed to.
MS Outlook supports managing alerts that were set up in SharePoint Sites.


On the Tools Menu in Outlook, Go to Rules and Alerts,

Under the Alerts Tab you will see all alerts that you have been subscribed to and you can now see your alerts and manage them better.