Sie sind auf Seite 1von 121

Is SharePoint workflow same as windows workflow?

The first basic important point to note is Sharepoint workflow and windows are not different
entities. The base for sharepoint workflow is window workflow. In other words sharepoint
workflow sits on the top of windows workflow and adds the human work flow flavor.
The below figure reflects the broader definition of sharepoint workflow. It takes the core
windows workflow from .NET framework and then applies content centric workflow on it.
Content centric workflows are nothing but simple windows work flow attached to list,
documents and custom contents.

Figure :- Content type workflow


You can visualize sharepoint workflows as windows workflow with human workflow touch
and feel. The human work flow touch and feel comes when the work flow is attached to a
content type like list, document etc.

For instance let's say we have made approve and disapprove windows work flow. You can
attach this work flow with a student content type and the human work flow for student then
becomes student passed and student failed. If the content type is invoice then approve work
flow can become a invoice paid work flow and disapprove can become invoice not paid.

In other words sharepoint workflow is content centric and they depict human work flow.
Figure :- Approve and Disapprove
What are the different stages of SharePoint workflow life cycle?

Sharepoint workflow cycle is very much unique to Sharepoint environment. As we said


sharepoint workflow are always connected in context with a sharepoint content like list or a
document.

Figure:- Four different stages in Sharepoint workflow


There are four stage in the sharepoint workflow cycle associate, initiate, modify and
complete.
1. Associate: - As said workflows in sharepoint are always talked in context with a
content type. So the first step is to associate a workflow with a content type like list
or a document.
2. Initiate: - The second step is to initiate the workflow instance. Work flows are
nothing but classes finally so a workflow instance needs to be created to start the
work flow in action.
3. Modify: - Later the workflow instance is modified as per the workflow stages.
4. Complete: - Finally the workflow object is terminated.

Figure :- Screen and sharepoint workflow


The web forms of share point interact with WSS who in turn then interacts with the windows
work flow runtime. The windows workflow runtime passed details to the appropriate
workflow instance depending on the data passed by WSS. The sharepoint workflow instance
then runs the work flow logic and takes appropriate action accordingly.
What is a three-state workflow in SharePoint?

Three-state workflow helps organization to track workflows which has three states and two
transitions. Its designed to track status of list item , task etc. With each transition between
states the work flow assigns the task to some person and sends a email alert.
Figure: - Three state workflow
In order to better understand three-state we will create a simple task list. This task list will
go through a review process. Following is how the workflow will be executed:-
• Administrator creates the initiates the task. The task is assigned to the reviewer.
• The reviewer then reviews the task, makes his comments and makes the task in
progress. Once he makes the task in progress it's automatically assigned to the
acceptor.
• Acceptor finally does the complete review and closes the task.

Figure: - Three state example


The first thing is to add two users in our computer domain one is the reviewer who will
review and the other is the acceptor who will close the task initative.
To see the workflow go to Site actions Site settings Workflows. You will see the 'Three-

state' workflow as shown in the below figure.

Let first create a team site so click on Site actions Site libraries and lists create a new

content Sites and workspaces and give some nice name like 'My team site'

Now click on 'My team site' , click on tasks and then click on list settings as shown in the
below figure.
Once you click on 'List setting' you will see lot of options. Goto the permission and
management section and click on 'Workflow Settings' as shown in the below figure.

You will prompted to create a new work flow. So create a new workflow and you will need to
fill in details of the workflow as shown in the below figure. Give a nice name to the work
flow, for the current sample we have given the name as 'My workflow'. We have specified
saying that create workflow as soon as the item is created.
A workflow will have three states an initial state, middle state and final state. These states
will be decided on the choice field of the task list. So when the status is having value 'Not
Started' then the work flow is in the initial state. When the status is with value 'In progress'
then the workflow is in middle state. When the status is completed that means the work
flow object will be terminated and the workflow will be marked as closed.
Now the second step is to tell the three-state work flow what needs to be done on every
work flow state. So let's fill what should happen when the work flow is initiated. When the
work flow is initiated it will be allocated to the user 'reviewer'. You can see the values
visually in the below figure.

When the reviewer reviews the document it's assigned to an acceptor. So when the
workflow is in the in progress state it's assigned to the acceptor for final closure.
So now that you have attached the work flow with the list its time to invoke the workflow on
the list. Click on new to add a task to the task list. Below are the details of task which we
need to enter. What we have done is we have entered a wrong statement with spelling
mistakes.
Now as soon as you click ok , you will see that the task is assigned to a reviewer.

Now login as reviewer and click on 'What is your name' ?


Now as reviewer you will correct the sentence and mark the task as 'In progress'.
As soon as you mark the task as in progress it's assigned to the acceptor. Now login as a
acceptor and mark the task as complete.

Once done click on work flows and you should be able to see a complete tri-state flow.
You can see how the work flow was initiated , how the reviewer reviewed it and finally the
acceptor closed it.

Step 1:- Create the Webpart


The first step is to create the WebPart. Below is the code snippet of a webPart. So we need
to reference the 'WebParts', the custom webpart class should inherit from 'WebPart' class
and finally we need to override the 'CreateChildControls' method with our custom
implementation.
Step 2 :- Copy the compile DLL to the virtual directory in the BIN folder.
The second step is to copy the compiled DLL in the virtual directory of the sharepoint site.

You can get the virtual directory from the IIS from home directory tab in IIS. For instance
the current website is hosted on the sharepoint 80 virtual site which is actually located at
'C: \Inetpub\wwwroot\wss\VirtualDirectories\80'.
So now let's browse to 'C: \Inetpub\wwwroot\wss\VirtualDirectories\80\bin' directory and
copy the DLL in the bin folder.
Step 3:- Make entry of the WebPart in to web.config file.
Now that we have copied the DLL to 'bin' folder, we need to make a 'SafeControl' entry in
the 'Web.Config' file of the virtual directory.
So now let's browse to 'C:\Inetpub\wwwroot\wss\VirtualDirectories\80', open the
web.config file and add the class library name in the 'SafeControls' section of the web.config
file. Below code snippet shows the same in a visual manner.

Step 4:- Add it to the WebPart gallery


Now that we have added the WebPart in the 'web.config' file its time to make it available in
the web part gallery. So click on Site settings --> then click webparts --> Click new button,
you should see the figure shown below.

You can also see the webpart which you recently added is seen the gallery. To make it
available click the check box and click populate gallery.

You should now see your webpart ( for this context it is SimpleLabelWebPart) in the WebPart
gallery.
Step 5:- Add the WebPart to site pages.
Ok so now that our WebPart is available in the gallery it's time to add this WebPart to a
SharePoint page. So goto the page where you want to add this WebPart, click on the site
action menu and click edit page as shown in the below figure.

On the page you should see a 'Add a webpart' button, click on it and it will populate with the
existing web parts. Browse to your web part and click add.
Once done your webpart is now added to the site page. You can edit the default webpart
properties by clicking on 'Modify Shared WebPart'. For simplicity sake we have changed the
title.

Step 6 :- View the WebPart


You can see the changed title display when view the page normally. So with a few lines of
coding you can see how we have achieved huge customization.
Talk to SharePoint through its web services
Introduction
Microsoft Office 2003 is very tightly integrated with SharePoint by utilizing its web services.
Windows SharePoint Services comes with sixteen different web services. SharePoint Portal
Server 2003 supports an additional five web services. The web services provided by
SharePoint do provide a vast array of features. But not all SharePoint features are accessible
through them. If required you can build your own web service on top of SharePoint
leveraging the managed SharePoint server API itself. The web service interfaces make it
very easy to integrate SharePoint capabilities right into your application.
This article is not a detailed documentation of every web method and web service provided
by SharePoint. It is rather an introduction to its capabilities and how to use them. You can
download the Windows SharePoint Services SKD or the SharePoint Portal Server SKD for a
complete reference of all web services and also of the server API itself. Please refer to this
article for a guide how to install and administrate SharePoint or this article for a guide how
to use and customize SharePoint portals.
How to add a Windows SharePoint web service reference
You can add a web reference to each SharePoint web service through your Visual Studio
.NET IDE. In your Solution Explorer right click on your project and select "Add Web
Reference" from your popup menu. The table below shows the URLs to use for each web
service provided by WSS. Enter the URL to the web service and click the Go button. This will
show you in the dialog box a summary of all available web methods. Next enter the name of
the web reference and then click Add Reference.
WSS Web Services Web Reference
Administration Service http:///_vti_adm/admin.asmx
Alerts Service http:///_vti_bin/alerts.asmx>
Document Workspace Service http:///_vti_bin/dws.asmx>
Forms Service http:///_vti_bin/forms.asmx>
Imaging Service http:///_vti_bin/imaging.asmx>
List Data Retrieval Service http:// /_vti_bin/dspsts.asmx>
Lists Service http:///_ vti_bin/lists.asmx>
Meetings Service http:/// _vti_bin/meetings.asmx>
Permissions Service http:// /_vti_bin/permissions.asmx>
Site Data Service http:///_vti_bin/sitedata.asmx>
Site Service http:///_vti_bin/sites.asmx>
Users and Groups Service http:///_vti_bin/usergroup.asmx>
Versions Service http:///_vti_bin/versions.asmx>
Views Service http:///_vti_bin/views.asmx>
Web Part Pages Service http:// /_vti_bin/webpartpages.asmx>
Webs Service http:///_vti_bin/webs.asmx>

Setting the web service user credentials


The SharePoint web services only accept calls from existing SharePoint users and do also
enforce access security. Import the System.Net namespace into your project and then use
the NetworkCredential class to set the user credential to use for the web service call. Here is
a code snippet:

public static XmlNode VersionsGetVersions(string SharePointHost, string UserName, string


Password, string Domain, string FileName)
{
// proxy object to call the Versions web service
Versions.Versions VersionsService = new Versions.Versions();
// the user credentials to use
VersionsService.Credentials = new NetworkCredential(UserName, Password, Domain);
VersionsService.Url = SharePointHost + "_vti_bin/Versions.asmx";
// gets the file versions
XmlNode Result = VersionsService.GetVersions(FileName);
// dispose the web service object
VersionsService.Dispose();
return Result;
}
For example, first you create an instance of the Versions web service. Then you assign a
new instance of the NetworkCredential class to the Credentials property on the created web
service object. We pass along the user name, password and the user's domain name to the
NetworkCredential object. Next you set the web service URL, which might very well be
different from the one used when you created the web reference. Finally you invoke the
desired web method, in the code snippet above the GetVersions() web method. The web
method takes a file name and returns a XML document with all available versions of this file
(Document libraries can have versioning enabled and then keep a history for each version).
At the end you call Dispose() on the web service object to free up any underlying
unmanaged resources.
If the user does not exist in SharePoint or does not have the permission to perform the
operation then a WebException is thrown by SharePoint. The returned HTTP status is 401,
which means unauthorized request. There are some inconsistencies across all web services.
For example some web methods take a XML string as input while others take an XmlNode as
input. Most web methods return the result as XmlNode while others return a XML string and
while others again return complex data structures. But after you get used to these
inconsistencies it is very easy to use these web services and integrate SharePoint
capabilities right into your application.
A summary of the "Windows SharePoint Services" web services
The following table provides an overview what capabilities are exposed through the
"Windows SharePoint Services" web services. Each web service is targeted towards a
specific area although there is some overlap. You for example can use the Lists web service
and the Site Data web service to work with SharePoint lists, or you can use the Site Data
web service and the Webs web service to work with sites meta-data and sub-sites. Please
refer to the attached "SharePoint web service browser" sample application which provides a
windows form interface to browse all web services and all its web methods. It enables you
to play with each web method or web service and better understand its usage. It also
displays to each web service and web method the detailed SDK help page.
WSS Web Description
Services
Administration This web service provides administrative capabilities like creating a new
Service top-level site, deleting a top-level site and getting the list of available
languages.
Alerts Service Provides access to the list of active alerts and allows to delete active
alerts.
Document This web service is used to manage Document Workspace sites. It allows
Workspace to create new document workspaces, delete document workspaces,
Service create new sub-folders, delete sub-folders, etc.
Forms Service Each list has forms associated which are used to display list items, create
new list items and update or delete existing list items. This web service
allows to get the collection of forms associated with a list and then get
detailed information about each form.
Imaging Service SharePoint has picture libraries which users can use to manage pictures.
This web service allows to upload pictures, download pictures, create new
folders, delete folders and pictures, etc.
List Data Allows to run XPath like queries against a list.
Retrieval Service
Lists Service This web service is used to work with lists and list data. You can obtain
the collection of lists, add new lists, remove lists, add new list
attachments, remove attachments, etc.
Meetings Service This web service is used to work with Meeting Workspaces. You can create
a new Meeting workspace, remove an existing Meeting workspace, add
new meetings, add new meetings using ICal files, etc.
Permissions Sites and lists have permissions assigned to them. This web service is
Service used to obtain the permissions assigned to a list or site, add new
permissions and update or removing existing permissions.
Site Data Service The Site Data web service can be used to return meta-data about a site
or list, get the collection of lists, get the attachments for a list item, get
the collection of items in a list, etc.
Site Service This web service can be used to return the list of site templates. When
you create a new site using the Administration web service you need to
specify the site template name to use which you can obtain through this
web service.
Users and Groups This web service is used to work with users, site-groups and cross-site
Service groups. You can add, update or remove users, site-groups and cross-site
groups. You can also add users or cross-site-groups to a site-group.
Versions Service Document Libraries and Picture Libraries can have versioning enabled,
which stores a copy of every single file version. This web service can be
used to get the list of available versions, delete versions and also restore
a file version.
Views Service Lists have views associated which define what fields are shown, what
filtering and sorting is applied, what grouping is applied, etc. This web
service is used to work with list views. You can get the collection of views,
add new views, remove views, update the Html code used to display a
view, etc.
Web Part Pages Web Parts are objects which you can place on web part pages. This web
Service service is used to work with web parts and web part pages. You can get
the list of web parts on a page, you can add or remove web parts, etc.
Webs Service This web service is used to work with sites and sub-sites. You can get the
list of list-templates, get meta-data about a sub-site, get the list of sub-
sites, etc.

A summary of the SharePoint Portal Server web services


SharePoint Portal Server provides the same web services as Windows SharePoint Services.
It also provides the following five additional web services.

WSS Web Description


Services
Area Service Areas are sections used in SharePoint Portal Server to group content. This
web service allows to manage areas. You can create new areas, update
areas, remove areas, get the list of sub-areas, etc.
Query Service The Query web service is used by clients to search SharePoint. You can send
in complex search XML requests and get a result-set of matches.
User Profile Users in SPS have user profiles that are used to target content to audiences
Service (users). This web service allows to obtain user profile information. It does
not allow to create or modify user profiles.
SPS Crawl This web service is undocumented and is used by SharePoint itself for site
Service crawling purposes.
Outlook Provides the same capabilities as the Alerts web service of WSS.
Adapter
Service

The table below shows the URLs to use for each web service provided by SharePoint Portal
Server. You can add them the same way as the WSS web services described above.
WSS Web Services Web Reference
Area Service http:///_vti_bin/areaservice.asmx>
Query Service http:///_vti_bin/search.asmx>
User Profile Service http:// /_vti_bin/userprofileservice.asmx
SPS Crawl Service http:///_vti_bin/spscrawl.asmx>
Outlook Adapter Service http:// /_vti_bin/outlookadapter.asmxd>

Namespaces used in the returned SharePoint XML documents


Many of the web methods return its result in form of an XML document. Most root nodes
have a namespace URI associated with it. Here is an example XML document returned by
the GetListCollection() web method (on the Lists web service). Please note that this is just a
partial XML snippet for demonstration purpose:
Naturally we would think of running an XPath query like "//List" using the SelectNodes()
method on the XmlDocument or XmlNode object. We expect it to return all the List nodes of
this XML document. But the result returned is empty. The reason being that you need to
query within the namespace associated with the root node. But how do you do that if there
is no namespace qualifier (or prefix) associated with the namespace URI. We need to use
the XmlNamespaceManager class to associate a namespace prefix to the namespace URI.
Here is the code snippet:
private XmlNodeList RunXPathQuery(XmlNode XmlNodeToQuery, string XPathQuery) {
// load the complete XML node and all its child nodes into a XML document XmlDocument
Document = new XmlDocument();
Document.LoadXml(XmlNodeToQuery.OuterXml);
// all the possible namespaces used by SharePoint and a randomly choosen prefix
const string SharePointNamespacePrefix = "sp";
const string SharePointNamespaceURI = http://schemas.microsoft.com/sharepoint/soap/";
const string ListItemsNamespacePrefix = "z";
const string ListItemsNamespaceURI = "#RowsetSchema";
const string PictureLibrariesNamespacePrefix = "y";
const string PictureLibrariesNamespaceURI =
http://schemas.microsoft.com/sharepoint/soap/ois/";
const string WebPartsNamespacePrefix = "w";
const string WebPartsNamespaceURI = http://schemas.microsoft.com/WebPart/v2;
const string DirectoryNamespacePrefix = "d";
const string DirectoryNamespaceURI =
http://schemas.microsoft.com/sharepoint/soap/directory/;
// now associate with the xmlns namespaces (part of all XML nodes returned
// from SharePoint) a namespace prefix which we can then use in the queries
XmlNamespaceManager NamespaceMngr = new
XmlNamespaceManager(Document.NameTable);
NamespaceMngr.AddNamespace(SharePointNamespacePrefix, SharePointNamespaceURI);
NamespaceMngr.AddNamespace(ListItemsNamespacePrefix, ListItemsNamespaceURI);
NamespaceMngr.AddNamespace(PictureLibrariesNamespacePrefix,
PictureLibrariesNamespaceURI);
NamespaceMngr.AddNamespace(WebPartsNamespacePrefix, WebPartsNamespaceURI);
NamespaceMngr.AddNamespace(DirectoryNamespacePrefix, DirectoryNamespaceURI);
// run the XPath query and return the result nodes
return Document.SelectNodes(XPathQuery, NamespaceMngr);
}
First we create a new XmlDocument object and load the XML string of the passed along
XmlNode into it. This way we can manipulate the XML document as needed without affecting
the original XmlNode object itself. Then we create an XmlNamespaceManger object and
assign it to the XmlDocument object. This we do by passing along the NameTable property
of the XmlDocument. Next we add all the namespace URI's with its namespace prefixes.
There are five different namespaces you will run into frequently (see declared constants).
Finally we run the XPath query and return the collection of matching XML nodes. The
namespace shown in our sample XML snippet gets the "sp" namespace prefix associated so
our XPath query would change to "//sp:List". This will now return all matching XML nodes.
Some real life examples of using the SharePoint web services
The following examples demonstrate how you can leverage the SharePoint web services to
interact tightly with SharePoint from within your application. The detailed code for each
example can be found in the attached "SharePoint explorer" sample application. The
description below explains which web service and web method to use to obtain the desired
SharePoint information.
Example 1 - Get the collection of SharePoint lists, fields and views
In the first example we want to get the collection of SharePoint lists. For each list we want
to get all the defined list fields (fields you can use to store information) and finally all views
associated with the list. Here are the web methods to call:
• On the Lists web service call the GetListCollection() web method to get the collection
of all SharePoint lists. This returns an XML document with all SharePoint lists.
• Next you run the "//sp:List" XPath query to get all matching List nodes. The Title
attribute of each matching node contains the name of the SharePoint list.
• For each SharePoint list we call the GetList() web method on the Lists web service,
passing along the list name. This returns a XML document with detailed information
about the list including the list of fields.
• Next you run the "//sp:Field" XPath query to get all the matching Field nodes. The
Name attribute contains the field name.
• For each SharePoint list we call the GetViewCollction() web method on the Views web
service, passing along again the list name. This returns a XML document listing all
views for the list.
• Finally you run the "//sp:View" XPath query to get all the matching View nodes. The
Name attribute contains the name of the view.
Example 2 - Get the list of users and site-groups
In this example we want to get the list of site users and to which site group each user
belongs. We also want to get the list of site groups and which users belong to each site
group.
• On the Users-and-Groups web service we call the GetUserCollectionFromWeb() web
method. This returns an XML document with all the site users.
• Next you run the "//d:User" XPath query to get all the matching User nodes. The
Name attribute contains the user name and the LoginName attribute the user's login
name.
• For each user we call the GetRoleCollectionFromUser() web method on the Users-
and-Groups web service passing along the user's login name. This returns a XML
document with all the site groups the user belongs to.
• Next you run the "//d:Role" XPath query to get all the matching Role nodes. The
Name attribute contains the site group name.
• To get the list of site groups call the GetRoleCollectionFromWeb() web method on the
Users-and-Groups web service. This returns an XML document with all site groups.
• Next you run again the "//d:Role" XPath query to get all the matching Role nodes.
The Name attribute contains the site group name.
• Finally call for each site group the GetUserCollectionFromRole() web method on the
Users-and-Groups web service passing along the site group name. This returns an
XML document with all the users belonging to this site group.
• Next you run again the "//d:User" XPath query to get all the matching User nodes.
The Name attribute contains the user name and the LoginName attribute the user's
login name.
Example 3 - Get the list of sites, site-templates and list-templates
With the last example we want to get a list of all sites in the site collection. We want to get
for the site collection the list of site templates. Additionally we want for each site the list of
list templates.
• First we call the GetAllSubWebCollection() web method on the Webs web service.
This returns an XML document with all sites in the site collection.
• Next run the "//sp:Web" XPath query to return all matching Web nodes. The Url
attribute contains the absolute URL for the site.
• Then we call the GetSiteTemplates() web method on the Sites web service. This
returns an array of available site templates in the site collection, which is an array of
the type Sites.Templates. The attached sample application converts all structures to
an XML document using reflection, so you can run XPath queries against it (see the
method SharePoint.SitesGetSiteTemplates()).
• Next run the "//SharePointServices.Sites.Templates" XPath query which returns all
matching template nodes. The Title attribute contains the template title and the
Name attribute the SharePoint template name.
• For each site we call the GetListTemplates() web method on the Webs web service.
Before calling the web service object you need to set the URL to the site URL
(returned by GetAllSubWebCollection()). This way we make sure that t he call is to
the site itself and returns the list templates of that site. This returns an XML
document with all list templates.
• To finish run the "//sp:SiteTemplate" XPath query to return all matching SiteTemplate
nodes. The DisplayName attribute contains the name of the list template.
Summary
SharePoint comes with a vast number of web services and web methods which enable you
to tightly integrate SharePoint capabilities into your application. It is very easy to learn and
use these web services and web methods. Please refer to the attached "SharePoint web
service browser" example which provides a complete wrapper class for all existing (about
150) web methods. This removes the burden of adding all the web references and worrying
about the details how to instantiate each web method, etc. The sample application provides
a user interface to explore all web methods. You can browse the web services and web
methods, display the SDK help page, enter the input values, execute the web method and
look at the displayed output values.
The second example - "SharePoint explorer" provides a much more comprehensive sample
of how to use and work with the SharePoint web services and web methods. It retrieves as
much information and displays the data in lists and tree nodes (always running simple XPath
queries against the result-set). The user interface allows you to traverse through the related
data. You can also write your own web services using the managed SharePoint server API.
Here is a sample application which provides a document check-in and check-out capability
through a new web service.

Tips & Tricks for Managing WSS 3.0

Introduction
This article is to give the developers or system administrators who are responsible for
installing WSS 3.0 for some tips which is important to keep their servers healthy and up
after installing WSS 3.0 on their web servers.

Problem

If you installed WSS 3.0 on your PC, I'd like to mention some tricks if you are a .net
developer or you are the person who managing web servers:

1-first, you will see that you can't debug any web application, if you are working in your
development PC, and you will get error message when you are trying to debug any asp.net
web site mentioning that "You are not debugger user", and you should notice that before
installing WSS 3.0 you can debug any asp.net website or web service.

Problem Resolution

The Cause of this error is: after installing WSS 3.0, it creates a default site on port 80,
and as you know that the default web site in IIS in listening also on port 80 that cause the
Default web site doesn't work, and even if you change the port for the default SharePoint
site, the site will not work.

Solution Tips & Tricks

Simply, 0pen SharePoint central administration site, go to Application managment, and click
on create or extend web application, and you have to extend the new site to be in different
port #.

Then select to create new application, as shown below.


The page below is shown that a new web application will be created on new port #.

This is not all, the new create web application, you have to create a site for it, because by default
it doesn't create the default site for you, create a new site.

Then, don't forget to delete the Default Site Web Application which is created when you
were installing WSS 3.0, it will delete the web application and all related sites for it.

Note: If you are a the person who responsible for managing web servers, don't forget to do
that on Peak time, and creating the new web site for your staff on extended site not the
default one as described above

Starting With Sharepoint


Why use Sharepoint?

Well, let me start from here, every organization let it be a Small, Medium Or Big would like
to webify each and every good activity that any employee carries out till (s)he is in
organization-premises and it becomes a matter of prestige for any organization to have
their own Enterprise portal. Truly speaking in today's world of internet your business can't
survive if you don't make your business compatible with E-World. But it's quite obvious that
not all the organizations can afford the huge amount that they had to invest in getting an
enterprise level portal build for them. For such kind of scenarios Microsoft came up with an
idea of "Sharepoint Server", and now it's only a matter of few clicks to build an enterprise-
portal. Here are the top 10 reasons for using an "Sharepoint Server".
1. Create a Complete View of Your Business Access

All the information, documents and applications you use throughout the day through
Microsoft Office SharePoint Portal Server 2003. Single Sign On and built in Microsoft
BizTalk Server and application connector integration enable IT Professionals to
integrate existing Line of Business applications into the portal. You can find and reuse
timely and relevant information from systems and reports, and quickly locate and
access documents, projects, and best practices by searching or browsing -- all
through the portal. Web Parts enable you to assemble a view of complementary
information from multiple sources, so you can view customer information from
Customer Relationship Management systems, Outlook, file shares and web sites at
the same time.

2. Put Relevant Information at Your Fingertips

Microsoft Office SharePoint Portal Server 2003 enables you to be more productive by
giving you immediate access to up-to-date, relevant information. You can organize
all the information, documents and applications you access throughout the day in a
single view on My Site. Single sign on and personalization services enable you to not
only access applications through the portal; SharePoint Portal Server provides direct
access to those sections of the application you are most interested in, without having
to remember your password. Audience targeting enables IT to customize an
experience for you based on your role, hierarchy or interests, pushing relevant news,
links, documents, applications and Web Services to your portal.

3. Share Knowledge Across the Organization

Microsoft Office SharePoint Portal Server 2003 makes it easy for Business Units,
teams and individuals to contribute content to the portal. Business Units can
integrate their SharePoint Portal into the enterprise portal, enabling them to share
knowledge with other Business Units. Teams can easily make the content in their
Microsoft Windows SharePoint Services sites discoverable through the portal through
browsing or searching. And users can publish documents and Best Practices to the
rest of the organization by adding them to the public view of their personal sites.By
integrating with other office products, such as Microsoft Access, Microsoft FrontPage
and Microsoft Visual Studio, teams can leverage and share information they already
have deep investments in.
4. Find and Leverage Your Organization's Intellectual Capital

SharePoint Portal Server's industry-leading search technology lets you locate


documents, project plans and Best Practices in file shares, web sites, Exchange
Public Folders, Lotus Notes, Windows SharePoint Services sites and databases
instead of re-creating the wheel. Create documents in FrontPage and show reports
using a live XML-based data connection. You can find more than just documents and
websites; SharePoint Portal Server provides access to the people and teams that
contribute knowledge to your organization. Links take you to My Sites and
SharePoint sites so you can investigate other contributions from the experts.
Information, documents and sites can also be organized into topics, enabling you to
find a wealth of relevant information by browsing.

5. Find, Aggregate and Provision SharePoint Sites

Microsoft Office SharePoint Portal Server 2003 utilizes Windows SharePoint Services
sites to create portal pages for people, information, and organizations. The portal
becomes a collaborative experience by extending the capabilities of Windows
SharePoint Services sites, enabling you to organize, manage and provision
SharePoint sites from the portal. Teams can also publish information in their sites,
sharing their Best Practices with the entire organization.

6. Create Self-Service Portals

With its industry-leading search, single sign on technology and built in BizTalk Server
and application connector integration, Microsoft Office SharePoint Portal Server 2003
enables you to create self-service portals for employees, partners and customers.
Employees can access HR systems and sign up for benefits using the same portal
they use everyday to access people, teams and knowledge. Because SharePoint
Portal Server is so easy to use, you can deploy it as an extranet and enable
customers and partners to place and track their own orders or search for support
documents, improving customer satisfaction while reducing your support costs.
Extend a team web site beyond static pages using FrontPage.

7. Automate Business Processes

Microsoft Office SharePoint Portal Server 2003 helps relevant information find you
through Alerts and Audience Targeting. Alerts notify you when any relevant
document, SharePoint site, or application has been added or changed. You can even
be alerted when a specific expert or team adds new information to the portal.
Audience targeting enables IT groups to push relevant information and applications
to a group of users with similar job roles, titles, or interests. Audiences can be
created from Active Directory, Distribution Lists, hierarchies, or any other criteria
that you define.

8. Speed Adoption with Familiar Interfaces and Tools

New technologies often fail because they are too hard to use and no one has time to
attend lengthy training courses. Microsoft Office SharePoint Portal Server 2003
speeds user adoption and lowers training costs by using familiar tools found in Office
applications, such as drop down boxes to display editing options, and drag and drop
tools to customize the portal content and layout. IT Professionals can create Web
Parts that expose information, applications and Web Services by using familiar tools
such as Visual Studio.NET and FrontPage.

9. Reduce Development Time and Cost with Out of the Box Portal Services

Microsoft Office SharePoint Portal Server 2003 can be deployed right out of the box
without any additional development work. Portal services such as search, SharePoint
site management, topics and My Sites are available immediately. Web Parts can be
created in FrontPage that provide read/write access to Microsoft applications such as
Outlook are also available right out of the box, lowering your development costs.

10. Ease Deployment with Flexible Options

Regardless of whether your organization wants to take a top-down or bottom-up


approach to deploying portals, Microsoft Office SharePoint Portal Server 2003 has a
deployment model that fits your needs. The portal is built on a scalable, highly
distributed architecture that can be deployed on a single box or server farm. You can
link Windows SharePoint Services sites, Business Unit portals and the enterprise
portal together at any time, enabling knowledge to be shared across the
organization.
What is the Relationship between Windows SharePoint Services and
SharePoint Portal Server 2003?

Microsoft SharePoint Products and Technologies facilitate collaboration within an


organization and with partners and customers. Using the combined collaboration features of
Windows SharePoint Services and SharePoint Portal Server 2003, users in your organization
can easily create, manage, and build their own collaborative Web sites and make them
available throughout the organization. Microsoft SharePoint Products and Technologies
facilitate collaboration within an organization and with partners and customers. Using the
combined collaboration features of Windows SharePoint Services and SharePoint Portal
Server 2003, users in your organization can easily create, manage, and build their own
collaborative Web sites and make them available throughout the organization. Windows
SharePoint Services is a collection of services for Microsoft Windows Server 2003 that you
can use to share information, collaborate with other users on documents, and create lists
and Web Part pages. You can also use Windows SharePoint Services as a development
platform for creating collaboration and information-sharing applications. SharePoint Portal
Server 2003 is a secure, scalable, enterprise portal server built upon Windows SharePoint
Services that you can use to aggregate SharePoint sites, information, and applications in
your organization into a single, easy-to-use portal. In addition to the features of Windows
SharePoint Services, SharePoint Portal Server 2003 includes the following features:
• News and Topics
• My Site, with personal and public views
• Information targeted to specific audiences
• Powerful indexing and searching across file shares, Web servers, secure Web servers,
Exchange Public Folders, Lotus Notes, and SharePoint sites
• Alerts that notify you when changes are made to relevant information, documents, or
applications
• Single sign-on for enterprise application integration
• Integration with Microsoft BizTalk Server
Because SharePoint Portal Server 2003 requires Windows SharePoint Services, all features
of Windows SharePoint Services are available in SharePoint Portal Server 2003.

Feature Matrix

The following table shows the features that are included in Windows SharePoint Services
and SharePoint Portal Server 2003.

Feature Windows SharePoint SharePoint Portal Server


Services 2003
Alerts Yes Yes
Browser-Based Customization Yes Yes
Discussion Boards Yes Yes
Document Libraries Yes Yes
Document Workspace Yes Yes
Meeting Workspace Yes Yes
Lists Yes Yes
BizTalk Integration Yes Yes
Microsoft FrontPage Yes Yes
Integration
Microsoft InfoPath Integration Yes Yes
Surveys Yes Yes
Templates Yes Yes
Web Part Pages Yes Yes
Automatic Categorization Yes Yes
Audiences Yes Yes
Topic Areas Yes Yes
News No Yes
Personal Sites No Yes
Shared Services No Yes
Single Sign-On No Yes
Site Directory No Yes
User Profiles No Yes
For more information: http://www.microsoft.com/sharepoint

How to create a SharePoint site within the portal?

SharePoint Portal Server enables information workers to rapidly develop team sites for
collaboration across the enterprise. The first step is to select whether you want to use a site
or a workspace template: sites are geared more for communication among team members,
whereas workspaces serve as a drafting and development environment. But in both cases,
sites and workspaces can be customized to suit your specific needs. See the following table
for examples of templates. You create sites the same way as you create workspaces.
However, the designation of a site or a workspace occurs at the end of the site creation
process when you are given a list of template options from which to choose.
Site and Workspaces
Template Description
Team Site Web sites based on Microsoft Windows SharePoint Services are designed to
be flexible. You can tailor a site to fit your users' needs by adding or
removing pages, changing the appearance of pages, changing the site
navigation, and making other customizations
Document New Document Workspace sites deliver sites that are centered on one or
Workspace more documents. You can easily work together with coworkers on a
Sites document - either by working directly on the copy located on the Document
Workspace site or by working on your own copy, which you can update
periodically with changes that are saved to the copy located on the Document
Workspace site. You can create a Document Workspace site from a word
processing program compatible with Windows SharePoint Services. For
example, you can create a Document Workspace from Microsoft Office Word
2003, Office Excel 2003, Office PowerPoint 2003, as a Shared Attachment in
Office Outlook 2003, or by using the browser from a document library.
Meeting New Meeting Workspace sites deliver a place for managing meetings and
Workspace their attendees, agendas, documents, decisions, and action items. Users can
Sites contribute to a Meeting Workspace site using a browser. You can create a
Meeting Workspace site from an e-mail program compatible with Windows
SharePoint Services, such as Office Outlook 2003 or by using the browser
from an events list.

How to Add Discussion Board?

Web sites based on Microsoft Windows SharePoint Services include Web discussions, a
special collaboration feature that allows users to communicate with each other on the World
Wide Web. Web discussions are threaded discussions that allow users to collaborate on
HTML documents or on any document that can be opened with a browser (such as .htm,
.xls, .doc, and .ppt files) on a server running Windows SharePoint Services. Users can add
and view discussion items located within documents, or general discussion items located in
the discussion pane.
After creating a workspace, you can add a discussion board, to maximize the interaction
among users. With proper management, discussions are a powerful collaborative tool.
However, without solid moderation, discussion boards can become cluttered and frustrating.
A discussion board can be created in the workspace site. Follow the steps below to learn
how to create a discussion board.
1. Navigate to an existing workspace site that you have created. If there are no
workspace sites available. Follow the instructions in the 'How to Create a Team Site'
before proceeding with the instructions below.
2. Click 'Create' on the Horizontal Navigation bar
3. Scroll to the Discussion Board section and click on the 'Discussion Board' link.
4. Enter a Name and Description for your new Discussion Board.
5. If you would like the new Discussion Board to show up in the left navigation of the
workspace site, select 'Yes' for the 'Display the Discussion Board on the Quick Launch
Bar'.
6. Click 'Create'
Once created, you can open the new discussion board by clicking Documents and Lists on
the Horizontal Navigation bar and then clicking the discussion board name in the Discussion
Boards section. If you chose to add the discussion board to the Quick Launch bar, you can
also click the discussion board name there to open it.
How to create A Meeting Workspace?

A Meeting Workspace site is a Microsoft Windows SharePoint Services sub site that is
designed for centralizing all the information and materials for one or more meetings.
Although some management tasks are specific to workspace sites, most of the tasks that
you do for other types of SharePoint sites also apply to Meeting Workspace sites. Help for
the Meeting Workspace site as well as general Windows SharePoint Services Help is
available from the workspace site.

To create a new meeting workspace, follow the instructions below:


1. Go to the Web site where you want to add the workspace site.
2. On the top link bar, click Create.
3. Under Web Pages, click Sites and Workspaces.
4. Complete the information about the workspace site you want to create, and then
click Create.
5. Select the Meeting Workspace template you want to use, and then click OK.
How to assign a new task?

Some management tasks are specific to workspace sites, most of the tasks that you do for
other types of SharePoint sites also apply to Meeting Workspace sites.
To assign a new task follow the steps below:
1. Navigate to an existing meeting workspace site. If there are no workspaces available.
Follow the instructions in the 'Creating a Meeting Workspace' before proceeding with
the instructions below.
2. If the task list is not present on the meeting site home page follow these
instructions, if a task list is present, skip this step.
1. Look to the upper right hand corner of the site and Click 'Modify this
Workspace'
2. Click 'Add Web Parts'
3. Drag and Drop 'Tasks' into a Web Part Zone
4. Click the 'x' to close the 'Add Web Parts' Window
3. At the top of the list, click New Item.
4. In the Title box, type a heading for the task.
This field is required.
5. Enter information in the remaining boxes as desired.
6. In the Start Date and Due Date boxes, click the calendar, select a date, and then
select a time in the hour and minutes boxes.
7. In the 'Assigned To' field select the teammate the task will be assigned to.
8. Click Save and Close.
How to post Meeting Follow-up Items?

Meetings typically generate action items.


To post follow up items within the site follow these steps:
1. Navigate to an existing meeting workspace site. If there are no workspaces available.
Follow the instructions in the 'Creating a Meeting Workspace' before proceeding with
the instructions below.
2. Look to the upper right hand corner of the site and Click 'Modify this Workspace'
1. Click the 'Show All Lists' Link
2. Scroll to and Click 'Tasks'
3. Enter a Name (i.e. Follow-Up Tasks) and Description. Click Create.
3. Look to the upper right hand corner of the site and Click 'Modify this Workspace'
1. Click 'Add Web Parts'
2. Drag and Drop 'Follow-Up Tasks' into a Web Part Zone
3. Click the 'x' to close the 'Add Web Parts' Window
4. At the top of the list, click New Item.
5. In the Title box, type a heading for the task. a. This field is required.
6. Enter information in the remaining boxes as desired.
7. In the Start Date and Due Date boxes, click the calendar, select a date, and then
select a time in the hour and minutes boxes.
8. In the 'Assigned To' field select the teammate the task will be assigned to.
9. Click Save and Close.
How to post Key Decisions?

To Post a new Decision follow the steps below:


1. Navigate to an existing meeting workspace site. If there are no workspaces available.
Follow the instructions in the 'Creating a Meeting Workspace' before proceeding with
the instructions below.
2. If the task list is not present on the meeting site home page follow these
instructions, if a task list is present, skip this step.
1. Look to the upper right hand corner of the site and Click 'Modify this
Workspace'
2. Click 'Add Web Parts'
3. Drag and Drop 'Decisions' into a Web Part Zone
4. Click the 'x' to close the 'Add Web Parts' Window
3. At the top of the list, click New Item.
4. In the Title box, type a decision.
1. This field is required.
5. Enter information in the remaining boxes as desired.
6. Click Save and Close.
How to Create a Document Workspace?

A Document Workspace is a drafting area for teams to work on documents; members can
go to the workspace to work on the documents or to participate in discussions and surveys
about the documents.
If you create a workspace based on an existing document, the Document Workspace site
carries the same name as the document on which it is based. The document is then stored
in a separate document library in the new Document Workspace site.
How to Create a Survey?

For a company intranet site, you may want a few people controlling the structure of the site,
but many more people who can add new content, or participate in surveys. So surveys are
anytime important aspect of an intranet portal. Steps to add create survey in your web
portal are,
1. Navigate to an existing workspace site that you have created. If there are no
workspace sites available. Follow the instructions in the 'How to Create a Team Site'
module before proceeding with the instructions below.
2. In the top link bar, click Create.
3. On the Create Page, click Survey.
4. In the Name box, type a name for the survey.
5. In the Description box, type a description of the purpose of the survey.
6. In the Navigation section, if you want a hyperlink to this survey to appear on the
Quick Launch bar, click Yes.
7. In the Survey Options section, if you want respondents' names to be visible when a
team member views the survey results, click Yes under Show user names in survey
results?
8. If you want to allow team members to respond more than once to the survey, click
Yes under Allow multiple responses?.
9. Click Next.
10. On the Add Question page, in the Question box, type a question.
11. Select an option for the type of answer that you want.
12. For example, if you want team members to choose from a set of items, click Choice.
13. In the Optional settings for your question section, specify the settings that you want.
14. The following types of answers are available, with options for each type as shown:
1. Single Lines of Text
2. Multiple Lines of Text
3. Choice
4. Rating
5. Scale
6. Number
7. Currency
8. Date/Time
9. Lookup
10. Yes/No
15. If you want to add more requisitions, click Next Question and repeat the steps
above.
16. When you are done adding questions, click Finish.
What are Public and Private Views?

One of the first things you will notice with My Site is that your personal site consists of two
views: A private view for personal information that only you can see, and a public view seen
by everyone else. The private view is shown by default when you first enter your personal
site. To switch to the public view, click Public in the Select View section of the action pane.
Private View

Your private view contains content targeted to you based on your membership in a
particular audience. For example, if you are a new employee, you might find links to key
training resources. You can also organize and access your documents, view and manage
your alerts and alert results, link to interesting people and information, view your e-mail
inbox, and maintain a calendar
Public View

Your personal site has a public view that contains information that you share with other
users. The public properties of your user profile are displayed on this page, along with links
and sites that you decide other users might want to see. Your most recent shared
documents also appear automatically in the public view of your personal site. However,
another user may not see all the content on your site depending upon their respective rights
to access certain content.
The public view of your personal site is a convenient way for you to manage the way that
other people in your organization find you and your work. You can easily update your public
profile; provide appropriate shared links, and share documents and other information. You
can send a link to your site to other people in your organization.
To switch to the public view on your My Site follow the steps below
1. From the portal home page click on the 'My Site' link in the upper right hand corner.
2. Click Public in the Select View section of the action pane.
What are Documents and Lists in Sharepoint?

In your personal site you can create a variety of collaborative spaces, including document
libraries, picture libraries, lists, discussion boards, surveys, sites, document workspaces,
and meeting workspaces.
The Difference between Private and Shared Document Libraries
When you open the Documents and Lists page, you may notice two types of document
libraries: Private Documents and Shared Documents.
• Use the Private document library for documents that you want to keep private; they
are only visible to you.
• Use the Shared document library to share a document with others; Documents
stored here are shared on your public home page.
How to Create an Alert?

Alerts are required when a user want to be notified of changes in the information of interest
to them. SharePoint alerts can be set to notify users of changes to documents, sites, lists
(announcements, contacts, events, tasks, surveys, and links), individual items in the lists,
news items, document libraries, and portal users. In addition, an alert can be set to notify
users when the results of a saved query change. With so many possibilities, it is important
that alerts be set up to provide the user with beneficial information as opposed to
generating a lot of messages that may get ignored.
Steps to create Alert
1. Navigate the portal and go to a page that displays a portal area.
2. In the Actions list (found in the left hand navigation bar), click Alert Me.
3. In the Title section, type a title for your alert or keep the automatically created
default title.
4. In the Delivery Options section, specify how you want to receive alert results. If you
click E-mail, specify how often you want to be notified of changes.
5. Click advanced options to view additional settings.
6. In the Alert Results section, specify whether you want to be notified when items have
been discovered or changed.
Note: By default, this alert informs you when area listings, lists, and list items are
discovered or changed.
7. In the Filter section, you can specify keywords to refine your alert results. Adding
filters to your alert limits results to omit items that do not match the restriction you
specify and reduces the number of results generated.
Tip: Separate words or phrases with a comma.
8. Click OK
How to Post or Publish Content to the Portal?

To organize the content within an area or sub area, you can assign content to different
groups. Each group is displayed by a group heading with the content listed under it. There
are default group headings called General, Highlight, and Expert that you can assign content
to. You can also create new groups that work best for your organization and content. For
example, in the Topics area, under the sub area Resources, you might create several groups
called Online Training, Classroom Training, and Books. You can also rename, delete, and
specify the order in which groups appear on a page.
How to Modify General Information about a Team Site?

In this task, you will learn how to manage your web site properties. Often, after you begin
to manage a new top-level site, you may need to modify the site settings you originally set
when creating the site.When you consider the management of sites in your organization, it
may be helpful to think about sites in the following hierarchy: Web sites in Microsoft
Windows SharePoint Services are organized into site collections. Each site collection has a
top-level Web site that can have multiple sub sites; each sub site can have multiple sub
sites. Because sites are nested in a hierarchy within the site collection, it can be challenging
to manage them all. However this is also the reason it is so important to properly maintain
your sites.
How to Apply a Theme to a Team Site?

A Windows SharePoint Services theme is a design set that establishes the fonts and color for
a Web site. By applying a theme, you apply visual consistency across your site.In this task,
you will learn how to apply a theme to an entire Web site. Each new Web site you create
automatically reflects the default theme. This theme can be changed from within the
browser of the SharePoint Portal Server.Themes and Web Editing ToolsEach time you apply a
theme using the web browser; it resets the theme across the entire site you have created.
However, applying a theme from within the browser will not change any pages formatted
using a Web page editing tool, such as FrontPage 2003.Therefore, it is recommended that
you try to avoid changing your theme once your content has been modified using a Web
editing tool.
How to find People within an Organization?

The best way to find other users within the organization is to use the search function at the
portal level. User profiles allow you to search for and connect with people within your
organization based on information they publish about themselves. Index and search services
use the profile information to improve search results.
Steps to Search for a Person:
1. From the Portal home page, simply type the person's name into the search field in
the top-right corner of the portal page and press Enter.
2. When a user name appears in the portal site, click the name to view the public view
of that person's personal site
Everything that a person chooses to share is available for you to see. You can see a person's
shared links to sites, people, and documents that might help you get your work done. You
can also see what information you have in common. This will help for collaboration
purposes.
How to conduct a Simple Search?

Microsoft Windows SharePoint Services enables users to search all Web site content on your
server or server farm - a broader search capability than offered in SharePoint Team Services
v1.0. In that version, searching was implemented using Internet Information Services (IIS)
catalogs and limited to documents on the file system; users were not able to search through
lists, such as tasks and contacts, or through discussion board items. Because all site
information (including documents) is now stored in a database, the search model has been
changed to allow searching of all site content.
Search features are only available for Windows SharePoint Services with Microsoft SQL
Server 2000. If you are running Microsoft SQL Server 2000 Desktop Engine (Windows)
(WMSDE) for your database, no search features are available. If you want to allow full-text
searching on your Web sites, you must upgrade to SQL Server 2000. Steps to carry out a
Simple Search
1. To begin searching, type a search term in the search box in the upper right corner of
the screen. For example, you can type the name of the team or division in which you
work to see documents, people, and information related to that team.
2. You can narrow the scope of your search by clicking the content sources list. This
provides you with a list of content sources that can be searched. To search all
content sources, ensure that All Sources is selected. 3. When you are ready, click the
green arrow to begin the search.
How do you modify 'My Page'?

Throughout the other modules you have created your personal profile, posted documents,
and searched for co-workers in your organization on your personal page, you may decide to
adjust your page to establish a more unique look. SharePoint Portal Server 2003 features
Web Parts; modular units of information that have a specific function and form the basic
building blocks of a Web Part Page.You can add web parts to your personal page from a Web
Part gallery while working in personal view in My Site. These Web Parts are called private
Web Parts because they are available only to the person who added or imported them - no
other users can see private Web Parts.
Using Web Parts

Typically the processes for adding Web Parts are the same whether you are on the adding
them to your personal page or to a shared page.
Adding Web Parts to My Page
Follow the steps below to complete the module:
1. Navigate to an existing workspace site that you have created. If there are no
workspace sites available. Follow the instructions in the 'How to Create a Team Site'
module before proceeding with the instructions below.
2. To add a web part to My Page,
1. If you are not already in Personal View, Switch to Personal View by clicking
the drop down arrow next to Modifying Shared Page.
2. Click 'Personal View'
3. Click the drop down arrow next to Modifying My Page.
4. Hover over 'Add Web Parts' and click 'Browse'.
5. Select the web part from the 'Web Part List' you would like to add and drag
and drop the web part into a zone.
6. Click the 'x' to close the 'Add Web Parts Window'
Design this Page

When you are in Web Part page design mode, you can drag web parts to arrange them on
the page.
Reset Page Content

You may decide that the changes to a page are no longer needed, and that you want to
return the page to its original content and layout. You can reset page content, but any
changes or customization that you've made are destroyed.
Reset Web Part Content

You may decide that the changes to an individual Web Part are no longer needed, and that
you want to return the Web Part to its original content and layout. You can reset Web Part
content, but any changes or customization that you've made are destroyed.
To reset Web Parts follow the steps below:
1. Click the arrow for the Web Part that you want to reset
2. Click Reset Web Part Content, then click OK
HINT: If the Reset Web Part Content is not available, no changes are made to this Web
Part.
In order to customize your My Site page to include inbox, tasks and calendar information,
your organization must be using Microsoft Exchange.
How to Personalize a Web Part on a Team Site?

You can practice Modifying Web Parts by clicking on the Activities on this page and the next.
These Activities will familiarize you with the general processes involved in changing the
appearance of web pages. Once you grasp the general steps involved in Modifying Web
Parts, you can take the liberty of exploring some of the other options available to you that
have not been covered in the Activities.
Personalized, Private and Shared Web Parts

You have different editing and viewing abilities, depending on the type of Web Part and upon
your permissions. The three varieties are explained below.
Personalized Web Part: If you modify a shared Web Part in Personal view, this becomes a
personalized Web Part. The changes you make this way are visible only to you.
Private Web Part: If you add a Web Part to a page in Personal view, it is a Private Web
Part. Private Web Parts are visible only to you.
Shared Web Part: If you have the authority to add a Web Part to a Shared View page, you
are adding a Shared Web Part. These are visible to all viewers of the Shared View page.
Assuming you have this authority and you would like to modify an existing Web Part, you
will notice the Advanced Properties are visible to you. These options are not available to the
general user.
How to Manage Site Groups and Permissions within in Team Site?

SharePoint has default site groups with default settings. Although it is possible to customize
the permissions for a default site group, it is not recommended. For example, if you
changed the permissions of the whole Content Manager group for your site, think about the
confusion users may have if a Content Manager on your site had different rights than the
Content Managers on Site B, or Site C, and so forth. For the sake of consistency and
security, changing the default rights of a site group is usually not the best form of site group
management.A better way to manage site group permissions is to create a new custom site
group, and assign the group the permissions you wish.

PDF Search in SharePoint

SharePoint Search! This is not a new topic at all but is certainly the most important area to
be explored in SharePoint. Microsoft boasts about SharePoint's search functionality as one of
the best in the world. SharePoint uses full text searching in order to retrieve relevant
information from a number of documents. Search works quite well when it comes to the
most popular formats like doc, txt, htm, xls, and ppt but fails in the case of mht, aspx, asp,
etc. PDF is not supported by default and one has to install the iFilter that can be downloaded
from the Adobe site. Install the filter, tweak your configuration files and within minutes, you
will be able to index and search PDF documents. Here are some links that show how to
enable PDF searching in SharePoint:

http://support.microsoft.com/?id=555209

http://support.microsoft.com/default.aspx?scid=kb;EN-US;832809

You will notice that the link shown in the above article takes you to the Adobe site where
you can download iFilter v5.0. For your information, Adobe has release iFilter v6.0 as well,
which is available for downloading. You can download it here:

http://www.adobe.com/support/downloads/detail.jsp?ftpID=2611

These filters help you index Adobe PDF documents with Microsoft Indexing clients. This
allows the user to easily search for text with in the PDF documents.

Theoretically, SharePoint searches following document types:


• ascx - ascx document
• asp - asp document
• aspx - aspx document
• doc - Microsoft Word Document
• dot - Microsoft Word Template
• eml - Internet E-Mail Message
• exch - exch document
• htm - HTML Document
• html - HTML Document
• jhtml - jhtml document
• jsp - jsp document
• mht - MHTML Document
• mhtml - MHTML Document
• nsf - nsf document
• odc - Microsoft Office Data Connection
• ppt - Microsoft PowerPoint Presentation
• pub - Microsoft Office Publisher Document
• tif - Microsoft Office Document Imaging File
• tiff - Microsoft Office Document Imaging File
• txt - Text Document
• url - Internet Shortcut
• vdx - vdx document
• vsd - vsd document
• vss - vss document
• vst - vst document
• vsx - vsx document
• vtx - vtx document
• xls - Microsoft Excel Worksheet
• xml - XML Document
Practically, not all documents are returned in the results even if you provided correct
keywords. Please read this great article from Bil Simser:

http://weblogs.asp.net/bsimser/archive/2004/10/06/238787.aspx

Things to remember:
1. Restart your IIS after adding a new iFilter. You don't need to restart your machine.
2. iFilter must be installed on the machine where your SQL Server is and not on the
machine where your SharePoint front end is installed.

Programmatically uploading multiple files to Custom sharepoint


list in 2007

Introduction:

A custom SharePoint list can be configured to collect any type of data and SharePoint
automatically generates the forms for adding new items, editing items and viewing items.

Team Web site comes with a built-in List Calendar, Task, which is listed on the Quick
Launch bar. A new custom list has to be created for storing the files.

Steps creating custom list:

Custom list created


Custom Column Creation

1. While creating custom list Named as FileList default column will create Title.
2. Modify column name Title as Filename.
3. Create one more column as Filedate.
4. Create one more column as FileSize.
Implementation of Web part

The files are added to the custom GridView (list) in web part level using browse file upload
button. You can add and delete multiple files in this list. Finally all the files are uploaded in
custom share point list Filelist using submit button in webpart.

The steps to create a web part


• Make sure installed VS.net 2005.
• Make sure installed Web part Project Library in your system.
• Start VS.Net 2005 and create a new project.
• Select Project Type as Visual C#-->SharePoint.
• Visual Studio Installed templates as Web Part.
• Change Name as MultipleUploadWebpart.

• Change Location as e:\ MultipleUploadWebpart.


• Change Solution name as FileUploadWebPart.
Using the Render method

The Web part base class seals the Render method of System.Web.UI.Control because
the Web Part infrastructure needs to control rendering the contents of a Web Part. For this
reason, custom Web Parts must override the Render method of the Web part base class.

The Complete Web part Code

#region File Information


///<summary>
///
------------------------------------------------------------------------------------------------------
/// Namespace : MultipleFileUploadWebPart
///
///Purpose : To Create Webpart to programmatically upload MultipleFiles to Custom
SharePoint List
///
/// Change History
///
-------------------------------------------------------------------------------------------------------
///Date Edit Author Comment
/// -------------+--------
+-------------------------------------------------------------------------------
///12-July-2007 [100] Saravanan_Gajendran Create Webpart
/// -------------+--------
+-------------------------------------------------------------------------------
///</summary>
using System;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;
using System.Data;
using System.IO;
using System.Text;
using System.Web.SessionState;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;

namespace MultipleUploadWebpart
{
[Guid("2115a405-ff46-4040-8370-6e4fcb7b9194")]
public class MultipleUploadWebpart : System.Web.UI.WebControls.WebParts.WebPart
{
#region Variables
private HtmlInputFile inputFile;
private Button btnUpload;
private Label lblMessage;
private GridView dgdUpload;
private string fileName = "";
private Button btnSubmit;
private HyperLinkFieldhlnkFileName;
private BoundField bndFileSize;
private BoundField bndFileKb;
private ButtonColumn btnclmDelete;
private CommandField cmdDelete;
private double length;
byte[] contents;
DataTable dt;//datatable use for multiple file upload
DataRow dr;//datarow use for multiple file upload
DataColumn dc;//datacolumn use for multiple file upload
double count = 0;//count of file size
#endregion
#region Create Child Control
protected override void CreateChildControls()
{
#region inputfile
this.inputFile = new HtmlInputFile();
this.inputFile.ID = "_fileUpload";
#endregion
#region message label
this.lblMessage = new Label();
this.lblMessage.ID = "_lblMessage";
this.lblMessage.Text = "";
#endregion

#region Button
this.btnUpload = new Button();
this.btnUpload.ID = "_btnUploadUpload";
this.btnUpload.Text = "Upload";
this.btnUpload.Click += new EventHandler(btnUploadUploadClick);
this.btnSubmit = new Button();
this.btnSubmit.ID = "_btnSubmit";
this.btnSubmit.Text = "Submit";
this.btnSubmit.Click += new EventHandler(btnSubmit_Click);
#endregion
#region GridView
this.dgdUpload = new GridView();
this.hlnkFileName = new HyperLinkField();
this.hlnkFileName.DataTextField = "FileName";
this.hlnkFileName.DataNavigateUrlFormatString = "FilePath";
this.hlnkFileName.HeaderText = "FileName";
this.bndFileSize = new BoundField();
this.bndFileSize.HeaderText = "FileSize";
this.bndFileSize.DataField = "FileSize";
this.bndFileKb = new BoundField();
this.bndFileKb.HeaderText = "";
this.bndFileKb.DataField = "KB";
this.cmdDelete = new CommandField();
this.cmdDelete.HeaderText = "Delete";
this.cmdDelete.ButtonType = ButtonType.Link;
this.cmdDelete.InsertImageUrl = "delete.gif";
this.cmdDelete.DeleteText = "Delete";
this.cmdDelete.ShowDeleteButton = true;
this.dgdUpload.ID = "_dgdFileUpload";
this.dgdUpload.Columns.Add(hlnkFileName);
this.dgdUpload.Columns.Add(bndFileSize);
this.dgdUpload.Columns.Add(bndFileKb);
this.dgdUpload.Columns.Add(cmdDelete);
this.dgdUpload.AutoGenerateColumns = false;
this.dgdUpload.RowDeleting += new GridViewDeleteEventHandler
(dgdUpload_RowDeleting);
#endregion
#region Add Controls
this.Controls.Add(dgdUpload);
this.Controls.Add(inputFile);
this.Controls.Add(lblMessage);
this.Controls.Add(btnUpload);
this.Controls.Add(btnSubmit);
base.CreateChildControls();
#endregion
}
#endregion
#region RowDeleting
private void dgdUpload_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int recordToDelete= e.RowIndex;
dt = (DataTable)Page.Session["Files"];
int cn = dt.Rows.Count;
dt.Rows.RemoveAt(recordToDelete);
dt.AcceptChanges();
Page.Session["Files"] = dt;
this.dgdUpload.DataSource = dt
this.dgdUpload.DataBind();
}
#endregion
#region OnLoad
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
}
#endregion
#region File in SharePoint List
private void btnSubmit_Click(object sender, EventArgs e)
{
SPWeb site = SPContext.Current.Web;
SPList list = site.Lists["FileList"];
SPListItemmyNewItem ;
dt = (DataTable)Page.Session["Files"];
int _dtcnt = dt.Rows.Count;
string strDate="";
foreach (DataRow dr in dt.Rows)
{
strDate = System.DateTime.Now.Date.TimeOfDay.ToString();
myNewItem = list.Items.Add();
fileName = dr["Filename"].ToString();
string strFilepath= dr["FilePath"].ToString()
StreamReader sr = new StreamReader(strFilepath);
StreamfStream=sr.BaseStream ;
contents = new byte[fStream.Length];
fStream.Read(contents, 0, (int)fStream.Length);
fStream.Close();
myNewItem["Filename"] = dr["Filename"].ToString();
myNewItem["FileSize"] = dr["FileSize"].ToString();
myNewItem["Filedate"] = strDate;
myNewItem.Attachments.Add(fileName, contents);
myNewItem.Update();
System.IO.File.Delete(strFilepath);
}
lblMessage.Text = "Sucessfully Submited";
}
#endregion
#region Upload File Add in List
protected void btnUploadUploadClick(object sender, EventArgs e)
{
fileName = System.IO.Path.GetFileName(inputFile.PostedFile.FileName);
if (fileName != "")
{
string _fileTime = DateTime.Now.ToFileTime().ToString();
string_fileorgPath = System.IO.Path.GetFullPath
(inputFile.PostedFile.FileName);
string _newfilePath = _fileTime + "~" + fileName;
length = (inputFile.PostedFile.InputStream.Length) / 1024;
string tempFolder = Environment.GetEnvironmentVariable("TEMP");
string_filepath = tempFolder + _newfilePath;
inputFile.PostedFile.SaveAs(_filepath);
AddRow(fileName, _filepath, length);
lblMessage.Text = "Successfully Added in List";
}
else
{
lblMessage.Text="Select a File";
return;
}
}
#endregion
#region Render
protected override void Render(HtmlTextWriter writer)
{
// TODO: add custom rendering code here.
EnsureChildControls();
this.inputFile.RenderControl(writer);
this.btnUpload.RenderControl(writer);
this.lblMessage.RenderControl(writer);
this.dgdUpload.RenderControl(writer);
this.btnSubmit.RenderControl(writer);
}
#endregion
#region AddMoreRows for file upload
private void AddMoreColumns()
{
dt = new DataTable("Files");
dc = new DataColumn("FileName", Type.GetType("System.String"));
dt.Columns.Add(dc);
dc = new DataColumn("FilePath", Type.GetType("System.String"));
dt.Columns.Add(dc);
dc = new DataColumn("FileSize", Type.GetType("System.String"));
dt.Columns.Add(dc);
dc = new DataColumn("KB", Type.GetType("System.String"));
dt.Columns.Add(dc);
Page.Session["Files"] = dt;
}
#endregion
#region AddRow for file upload
private void AddRow(string file, string path, double length)
{
dt = (DataTable)Page.Session["Files"];
if (dt == null)
{
AddMoreColumns();
}
dr = dt.NewRow();
dr["FileName"] = file;
dr["FilePath"] = path;
dr["FileSize"] = Convert.ToString(length);
dr["KB"] = "KB";
dt.Rows.Add(dr);
Page.Session["Files"] = dt;
this.dgdUpload.DataSource = dt;
this.dgdUpload.DataBind();//bind in grid
}
#endregion
}
}

Deploy File Upload Web part in the share point server


1. Right click solution file then select properties.
2. Select Debug Start browser with URL selects your respective SharePoint Site.
3. Select Signing option.

4. Ensure the strong name key and sign the assembly check box.
5. Right Click properties select Deploy.

6. It is automatically deployed the web part in respective site.


7. Deploy will take care of .Stop IIS, Buliding solution, Restarting Solution, Creating
GAC, Restarting IIS like that.
8. Multiple Upload Webpart is new one.
9. New MultipleUploadWebpart Web Part.

Events
1. Browse Button

It is used to browse and select the particular file.

2. Upload Button

It is used to upload file to the windows temp folder then list the files.
3. Submit Button

It is used to store all files in share point custom list.


All the files are listed
Delete

using this option you need to delete the file in this list.Whenever you give the submit only it
will go to SharePoint list.
All the files are uploading in respective share point custom list.

Sharepoint Workflow Custom Activity for Active Directory &


Deployment on Moss 2007

Creating your own Custom Workflow Activities as Components using Windows


Workflow Foundation (Framework 3.0) and deployment on SharePoint 2007.

Required Installation Setup


• Visual Studio .Net 2005
• Framework 3.0
• Windows Workflow Foundation Extension for Workflow Activity Template
• SharePoint Portal 2007,SharePoint Services and Microsoft Office SharePoint Designer
The steps to add a simple activity to the SharePoint Designer interface include:
1. Create a custom activity assembly.
2. Sign and deploy the activity assembly to the GAC.
3. Configure SharePoint to recognize the custom activity.
4. Create a .ACTIONS file to be used by SharePoint Designer.
Step 1: Create a custom activity assembly
• Open Visual Studio 2005 solution.
• Select New Project and Workflow Activity Library Template which is a project for
creating a library of activities which can later be reused as building blocks in
workflows.
Code Block
using System;<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office"
/>
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;
using System.Collections.Generic;
using System.Text;
namespace ActivityLibrary1
{
public partial class ADComponent : System.Workflow.ComponentModel.Activity
{
private string cn;
public ADComponent()
{
InitializeComponent();
}
public static DependencyProperty DirectoryUriProperty = DependencyProperty.
Register"DirectoryUri",typeofSystem.String),typeo(ActivityLibrary1.ADComponent));
[DescriptionAttribute("Please specify the URI of the directory. Either an AD Server
or an XML File.")]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
[ValidationOption(ValidationOption.Required)]
[BrowsableAttribute(true)]
[Category("Directory")]
public string DirectoryUri
{
get
{
return ((String)(base.GetValue(ADComponent.DirectoryUriProperty)));
}
set
{
base.SetValue(ADComponent.DirectoryUriProperty, value);
}
}
public static DependencyProperty QueryProperty = DependencyProperty.Register
("Query", typeof(System.String), typeof(ActivityLibrary1.ADComponent));
[DescriptionAttribute("Please specify the Username of the user to retrieve.")]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
[ValidationOption(ValidationOption.Optional)]
[BrowsableAttribute(true)]
[Category("Query")]
public string Query
{
get
{
return ((String)(base.GetValue(ADComponent.QueryProperty)));
}
set
{
base.SetValue(ADComponent.QueryProperty, value);
}
}
public static DependencyProperty RetrievedUserDataProperty = Dependency
Property.Register ("RetrievedUserData", typeof(System.String), typeof
(ActivityLibrary1.ADComponent));
[DescriptionAttribute("Please specify the Username of the user to retrieve.")]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
[ValidationOption(ValidationOption.Optional)]
[BrowsableAttribute(true)]
[Category("RetrievedUserData")]
public string RetrievedUserData
{
get
{
return ((String)(base.GetValue(ADComponent.RetrievedUserDataProperty)));
}
set
{
base.SetValue(ADComponent.RetrievedUserDataProperty, value);
}
}
public string CN
{
get
{
return cn;
}
set
{
cn = value;
}
}
protected override ActivityExecutionStatus Execute(ActivityExecutionContext
context)
{
string a = "ActiveDirectory";
switch (a)
{
case "ActiveDirectory":
ADHelper adh = new ADHelper(this.DirectoryUri);
CN = adh.FetchUser(this.Query);
break;
}
//Set the results property
this.RetrievedUserData = CN;
return ActivityExecutionStatus.Closed;
}
}
}

Code Bock For Supportive ADHelper Class


//-----------------------------------------------------------------------------//
//--------------Active Directory helper Class----(Rifaqat:2nd April 06)-------//
//-------Description: ...............................................--------//
//-------------------------------------------------------------------------//
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.DirectoryServices;
using System.Collections;
namespace ActivityLibrary1
{
internal class ADHelper
{
private string ldapPath;
DirectorySearcher search;
internal ADHelper(string ldapPath)
{
this.ldapPath = ldapPath;
search = new DirectorySearcher(new DirectoryEntry(ldapPath));
}
internal string GetUsersManager(string loginName)
{
SearchResult result;
search.Filter = String.Format("(SAMAccountName={0})", loginName);
search.PropertiesToLoad.Add("manager");
result = search.FindOne();
if (result == null)
{
return "";
}
else
{
string userPath = result.Properties["manager"][0].ToString();
System.DirectoryServices.DirectoryEntry de = new DirectoryEntry("LDAP://" +
userPath);
return de.Properties["sAMAccountName"].Value.ToString();
}
}

internal string FetchUser(string Designation)


{
string _User = "";
try
{
SearchResult result;
search.Filter = String.Format("(Title={0})", Designation);
search.PropertiesToLoad.Add("cn");
result = search.FindOne();
if (result != null)
{
_User = result.Properties["cn"][0].ToString();
}
}
catch (Exception ex)
{
}
return _User;
}
internal string FetchUseronDesg(string loginName)
{
string _User = "";
try
{
SearchResult result;
search.Filter = String.Format("(SAMAccountName={0})", loginName);
search.PropertiesToLoad.Add("title");
search.PropertiesToLoad.Add("cn");
result = search.FindOne();
if (result != null)
{
_User = result.Properties["title"][0].ToString();
}
}
catch (Exception ex)
{
string s = ex.Message;
}
return _User;
}
}
}

Your Solution Explorer will be like this:

In this code the DirectoryUri and Query are passing as inputproperty and are used to specify
the text that will be displayed in the Display Name of User as Output. We use a dependency
property to enable the workflow to bind data to it. As with all workflow activities, the
Execute method performs the action.

Step 2: Sign and deploy the activity assembly to the GAC

Step 3: Configure SharePoint to recognize the custom activity

After you build the custom activity assembly, sign it and copy it to the GAC. You then have
to tell SharePoint to trust the assembly. This is similar to configuring a web part as a safe
control, but instead of adding an entry to the <SafeControls> section, you add an entry to
the <System.Workflow.ComponentModel.WorkflowCompiler> section. Edit the web.config
file for your SharePoint web application and add an <authorizedType> element as in the
following example:
• Goto in your Site using this URL C:\Inetpub\wwwroot\wss\VirtualDirectories\10161
• Open your Config File.
• You need to add your assembly in specific site port config file:

<authorizedType Assembly="rifaqat.Components, Version=1.0.0.0, Culture=neutral,


PublicKeyToken=e8f8c868b9896b0a" Namespace="rifaqat.Components"
TypeName="*" Authorized="True" />
<authorizedType Assembly="ActivityLibrary1, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=8fd4b4c3a190a3c6" Namespace="ActivityLibrary1" TypeName="*"
Authorized="True" />
Step 4: Create a .ACTIONS file to be used by SharePoint Designer
• The final step is to create the .ACTIONS file that describes the activity to SharePoint
Designer. Since this is an XML file, you can create it using Visual Studio or any XML
editor.
• This file describes the public properties exposed by the activity and tells SharePoint
Designer how to map those properties into rules that can be displayed to the user.
The following code shows a custom .ACTIONS file for the custom Active Directory
activity.
• Goto this path for .Actions File

C:\Program Files\Common Files\Microsoft Shared\web server


extensions\12\TEMPLATE\1033\Workflow
<?xml version="1.0" encoding="utf-8" ?>
<WorkflowInfo>
<Actions Sequential="then" Parallel="and">
<Action Name="Fetch User Onbehalf of Designation"
ClassName="Microsoft.SharePoint.WorkflowActions.CollectDataTask"
Assembly="Microsoft.SharePoint.WorkflowActions, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c"
AppliesTo="all"
CreatesTask="true"
Category="Task Actions">
<RuleDesigner Sentence="Collect %1 from %2 (Output to %3)">
<FieldBind Field="Title,ContentTypeId" DesignerType="Survey" Text="data" Id="1"/>
<FieldBind Field="AssignedTo" DesignerType="SinglePerson" Text="this user"Id="2"/>
<FieldBind Field="TaskId" DesignerType="ParameterNames" Text="collect" Id="3"/>
</RuleDesigner>
<Parameters>
<Parameter Name="__Context" Type="Microsoft.SharePoint.WorkflowActions.
WorkflowContext, Microsoft.SharePoint.WorkflowActions" Direction="In" />
<Parameter Name="ContentTypeId" Type="System.String, mscorlib"Direction="In" />
<Parameter Name="AssignedTo" Type="System.String, mscorlib" Direction="In" />
<Parameter Name="Title" Type="System.String, mscorlib" Direction="In" />
<Parameter Name="TaskId" Type="System.Int32, mscorlib" Direction="Out" />
</Parameters>
</Action>
</Actions>
</WorkflowInfo>
• The Actions tag tells SharePoint Designer what to display for each action in the set.
Within that, the Action tag describes the individual action. The Name attribute is
what gets displayed in the designer. The ClassName and Assembly attributes are
used in the generated XAML for the workflow. The interesting part is the way the
RuleDesigner and Parameter tags work. The RuleDesigner tag lets you set up a
sentence that gets displayed in the designer as you build up the workflow. The
Sentence attribute allows you to bind to the activity properties and then substitute
their values when the activity is executed.
• You can declare as many actions as you want in the file. A good rule of thumb is to
use a separate .ACTIONS file for each logical group of custom activities you wish to
deploy. Once you've created your .ACTIONS file and copied it to the server, you can
refresh the site in SharePoint Designer and your custom activity will appear in the
workflow designer as shown below.
Sharepoint Workflow Custom Activity for Active Directory &
Deployment on Moss 2007
Creating your own Custom Workflow Activities as Components using Windows
Workflow Foundation (Framework 3.0) and deployment on SharePoint 2007.

Required Installation Setup


• Visual Studio .Net 2005
• Framework 3.0
• Windows Workflow Foundation Extension for Workflow Activity Template
• SharePoint Portal 2007,SharePoint Services and Microsoft Office SharePoint Designer
The steps to add a simple activity to the SharePoint Designer interface include:
1. Create a custom activity assembly.
2. Sign and deploy the activity assembly to the GAC.
3. Configure SharePoint to recognize the custom activity.
4. Create a .ACTIONS file to be used by SharePoint Designer.
Step 1: Create a custom activity assembly
• Open Visual Studio 2005 solution.
• Select New Project and Workflow Activity Library Template which is a project for
creating a library of activities which can later be reused as building blocks in
workflows.
Code Block
using System;<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office"
/>
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;
using System.Collections.Generic;
using System.Text;
namespace ActivityLibrary1
{
public partial class ADComponent : System.Workflow.ComponentModel.Activity
{
private string cn;
public ADComponent()
{
InitializeComponent();
}
public static DependencyProperty DirectoryUriProperty = DependencyProperty.
Register"DirectoryUri",typeofSystem.String),typeo(ActivityLibrary1.ADComponent));
[DescriptionAttribute("Please specify the URI of the directory. Either an AD Server
or an XML File.")]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
[ValidationOption(ValidationOption.Required)]
[BrowsableAttribute(true)]
[Category("Directory")]
public string DirectoryUri
{
get
{
return ((String)(base.GetValue(ADComponent.DirectoryUriProperty)));
}
set
{
base.SetValue(ADComponent.DirectoryUriProperty, value);
}
}
public static DependencyProperty QueryProperty = DependencyProperty.Register
("Query", typeof(System.String), typeof(ActivityLibrary1.ADComponent));
[DescriptionAttribute("Please specify the Username of the user to retrieve.")]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
[ValidationOption(ValidationOption.Optional)]
[BrowsableAttribute(true)]
[Category("Query")]
public string Query
{
get
{
return ((String)(base.GetValue(ADComponent.QueryProperty)));
}
set
{
base.SetValue(ADComponent.QueryProperty, value);
}
}
public static DependencyProperty RetrievedUserDataProperty = Dependency
Property.Register ("RetrievedUserData", typeof(System.String), typeof
(ActivityLibrary1.ADComponent));
[DescriptionAttribute("Please specify the Username of the user to retrieve.")]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
[ValidationOption(ValidationOption.Optional)]
[BrowsableAttribute(true)]
[Category("RetrievedUserData")]
public string RetrievedUserData
{
get
{
return ((String)(base.GetValue(ADComponent.RetrievedUserDataProperty)));
}
set
{
base.SetValue(ADComponent.RetrievedUserDataProperty, value);
}
}
public string CN
{
get
{
return cn;
}
set
{
cn = value;
}
}
protected override ActivityExecutionStatus Execute(ActivityExecutionContext
context)
{
string a = "ActiveDirectory";
switch (a)
{
case "ActiveDirectory":
ADHelper adh = new ADHelper(this.DirectoryUri);
CN = adh.FetchUser(this.Query);
break;
}
//Set the results property
this.RetrievedUserData = CN;
return ActivityExecutionStatus.Closed;
}
}
}

Code Bock For Supportive ADHelper Class

//-----------------------------------------------------------------------------//
//--------------Active Directory helper Class----(Rifaqat:2nd April 06)-------//
//-------Description: ...............................................--------//
//-------------------------------------------------------------------------//
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.DirectoryServices;
using System.Collections;
namespace ActivityLibrary1
{
internal class ADHelper
{
private string ldapPath;
DirectorySearcher search;
internal ADHelper(string ldapPath)
{
this.ldapPath = ldapPath;
search = new DirectorySearcher(new DirectoryEntry(ldapPath));
}
internal string GetUsersManager(string loginName)
{
SearchResult result;
search.Filter = String.Format("(SAMAccountName={0})", loginName);
search.PropertiesToLoad.Add("manager");
result = search.FindOne();
if (result == null)
{
return "";
}
else
{
string userPath = result.Properties["manager"][0].ToString();
System.DirectoryServices.DirectoryEntry de = new DirectoryEntry("LDAP://" +
userPath);
return de.Properties["sAMAccountName"].Value.ToString();
}
}

internal string FetchUser(string Designation)


{
string _User = "";
try
{
SearchResult result;
search.Filter = String.Format("(Title={0})", Designation);
search.PropertiesToLoad.Add("cn");
result = search.FindOne();
if (result != null)
{
_User = result.Properties["cn"][0].ToString();
}
}
catch (Exception ex)
{
}
return _User;
}
internal string FetchUseronDesg(string loginName)
{
string _User = "";
try
{
SearchResult result;
search.Filter = String.Format("(SAMAccountName={0})", loginName);
search.PropertiesToLoad.Add("title");
search.PropertiesToLoad.Add("cn");
result = search.FindOne();
if (result != null)
{
_User = result.Properties["title"][0].ToString();
}
}
catch (Exception ex)
{
string s = ex.Message;
}
return _User;
}
}
}

Your Solution Explorer will be like this:

In this code the DirectoryUri and Query are passing as inputproperty and are used to specify
the text that will be displayed in the Display Name of User as Output. We use a dependency
property to enable the workflow to bind data to it. As with all workflow activities, the
Execute method performs the action.

Step 2: Sign and deploy the activity assembly to the GAC

Step 3: Configure SharePoint to recognize the custom activity

After you build the custom activity assembly, sign it and copy it to the GAC. You then have
to tell SharePoint to trust the assembly. This is similar to configuring a web part as a safe
control, but instead of adding an entry to the <SafeControls> section, you add an entry to
the <System.Workflow.ComponentModel.WorkflowCompiler> section. Edit the web.config
file for your SharePoint web application and add an <authorizedType> element as in the
following example:
• Goto in your Site using this URL C:\Inetpub\wwwroot\wss\VirtualDirectories\10161
• Open your Config File.
• You need to add your assembly in specific site port config file:

<authorizedType Assembly="rifaqat.Components, Version=1.0.0.0, Culture=neutral,


PublicKeyToken=e8f8c868b9896b0a" Namespace="rifaqat.Components"
TypeName="*" Authorized="True" />
<authorizedType Assembly="ActivityLibrary1, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=8fd4b4c3a190a3c6" Namespace="ActivityLibrary1" TypeName="*"
Authorized="True" />
Step 4: Create a .ACTIONS file to be used by SharePoint Designer
• The final step is to create the .ACTIONS file that describes the activity to SharePoint
Designer. Since this is an XML file, you can create it using Visual Studio or any XML
editor.
• This file describes the public properties exposed by the activity and tells SharePoint
Designer how to map those properties into rules that can be displayed to the user.
The following code shows a custom .ACTIONS file for the custom Active Directory
activity.
• Goto this path for .Actions File

C:\Program Files\Common Files\Microsoft Shared\web server


extensions\12\TEMPLATE\1033\Workflow
<?xml version="1.0" encoding="utf-8" ?>
<WorkflowInfo>
<Actions Sequential="then" Parallel="and">
<Action Name="Fetch User Onbehalf of Designation"
ClassName="Microsoft.SharePoint.WorkflowActions.CollectDataTask"
Assembly="Microsoft.SharePoint.WorkflowActions, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c"
AppliesTo="all"
CreatesTask="true"
Category="Task Actions">
<RuleDesigner Sentence="Collect %1 from %2 (Output to %3)">
<FieldBind Field="Title,ContentTypeId" DesignerType="Survey" Text="data" Id="1"/>
<FieldBind Field="AssignedTo" DesignerType="SinglePerson" Text="this user"Id="2"/>
<FieldBind Field="TaskId" DesignerType="ParameterNames" Text="collect" Id="3"/>
</RuleDesigner>
<Parameters>
<Parameter Name="__Context" Type="Microsoft.SharePoint.WorkflowActions.
WorkflowContext, Microsoft.SharePoint.WorkflowActions" Direction="In" />
<Parameter Name="ContentTypeId" Type="System.String, mscorlib"Direction="In" />
<Parameter Name="AssignedTo" Type="System.String, mscorlib" Direction="In" />
<Parameter Name="Title" Type="System.String, mscorlib" Direction="In" />
<Parameter Name="TaskId" Type="System.Int32, mscorlib" Direction="Out" />
</Parameters>
</Action>
</Actions>
</WorkflowInfo>
• The Actions tag tells SharePoint Designer what to display for each action in the set.
Within that, the Action tag describes the individual action. The Name attribute is
what gets displayed in the designer. The ClassName and Assembly attributes are
used in the generated XAML for the workflow. The interesting part is the way the
RuleDesigner and Parameter tags work. The RuleDesigner tag lets you set up a
sentence that gets displayed in the designer as you build up the workflow. The
Sentence attribute allows you to bind to the activity properties and then substitute
their values when the activity is executed.
• You can declare as many actions as you want in the file. A good rule of thumb is to
use a separate .ACTIONS file for each logical group of custom activities you wish to
deploy. Once you've created your .ACTIONS file and copied it to the server, you can
refresh the site in SharePoint Designer and your custom activity will appear in the
workflow designer as shown below.

Project web access integration with outlook

Introduction
• Click Personal Settings --> Out Look Sync
• Click Download Now
• Start Outlook 2003 or 2007.
• A toolbar will be added to the Outlook interface
• Click Tools --> Options
• Click Project Web Access Tab
There are two options for importing Tasks
• Outlook Tasks
• Outlook Calendar
You can also set your Project web access user id and password for automatic login and
status update.
• From PWA Toolbar Click Import New Assignments
• Click OK to import the tasks
• Tasks will be displayed on Outlook Welcome Screen as well as tasks page
• Click ON Tasks button on the left menu to go inside the tasks page
• Click on any task to see its details
• Now Double Click on any task to see its details
• Click next or Previous to move into different time spans.
• Enter the appropriate time in the task progress or timesheet information
• To save click Save to Project Web Access
• To Sent Timesheet to Project Manager Check the "And submit to project manager".
• You can also visit the PWA from the buttons given on this page.
• Using Outlook Calendar

a. Change the settings in PWA Options


b. Click Import Assignments fro m Toolbar

c. Click OK

d. You will automatically see the notification if the tasks are late otherwise you can
see the task from calendar page.

e. Click On Calender

f. Navigate to the dates of the tasks

g.You can also choose categories to identify various tasks.

Understanding connected world of MOSS 2007

Purpose:

A walk through fundamental knowledge about MOSS 2007.

Who should read this Article?

For all sort of programmers/ developers, Middle level management, Team Leads, Application
architects

Article:

The core target of Microsoft Office SharePoint Server (MOSS 2007) is to aggregate disparate
(Different but separate applications) information, events, processes and enterprise services
into a unified single view without to open multiple applications and cut and paste
information across multiple screens.

In MOSS 2007 these composite applications are based on the concept of a service-oriented
architecture (SOA). MOSS 2007 framework helps you develop components as distributed,
reusable business services. MOSS 2007 split into small applications in small pieces.

MOSS 2007 is basically superstructure who represents the high-level integration of users,
one-stop shop form information, managing interactions between people, and line-of-
business (LOB) data within organization and cross enterprises. MOSS 2007 based on SOA
framework that is driven by standard XML/ Web services.

It provides a window that connects people, processes, and information to create a unique &
rich end user experience. For example, during a natural disaster, it can provide critical
information to coordinate a response effort, monitoring traffic patterns, delivering supplies,
dispatching resources, and aggregating information to present operational insight. In a
manufacturing setting, you might use it to monitor inventory levels and assembly processes
up and down a supply chain. It's an excellent aggregation point for all of these types of
situations.

MOSS 2007 is point of collaboration & contents sharing. For example, SharePoint Portal
includes workspace to help loan officers find, organize, and share information so they can
process loans more efficiently. These workspaces used to be very limited in their reach,
which resulted in a proliferation of mediums to support discrete processes. A mortgage
broker might use a file system to store documents, e-mail to deliver loan applications to
customers, a Web site to gather additional customer information, and a spreadsheet to
monitor the loan approval process.

MOSS 2007 can unify all these tasks and offer collaboration tools to streamline the loan
approval workflow. Loan officers will then have a single place to access and modify
documents, check documents in and out of a repository, and work collaboratively to process
loans, all without having to use multiple interface mechanisms.

So, MOSS 2007 become more process-centric, they serve as clearinghouses for managing
multiple activities in multiple manners.

Developing a Web Part for Moss 2007


Introduction:

We will be learning how to develop a Web Part that loads in a SharePoint site. To
begin creating a web part:
• VS.NET 2005 installed.
• "Web Part Project Library" installed on your system.
• Start VS.NET 2005 and create a new project.
• Select Project Type as Visual C#-->SharePoint.
• Visual Studio Installed templates as Web Part.
• Change Name to Web Part Basics.
• Change Location to e:\Webpartbasics (or appropriate drive letter).
• Change Solution name to FileUploadWebPart.
The Render Method

The Web Part base class overrides the Render method of System.Web.UI.Control because
the Web Part infrastructure needs to control the rendering of the Web Part contents. For this
reason custom Web Parts must override the Render method of the Web part base class.

The Complete Web Part Code


/*Creation
Log**********************************************************<?xml:namesp
ace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
* Author : Saravanan Gajendran
* Creation Date : 12-01-2008
* FileName : Webpartbasics.cs
* Class : Webpartbasics
* Description : Tracking the web part life cycle.
A Web Part is an add-on ASP.NET technology to Windows SharePoint
Services
***********************************************************************/

using System;
using System.Web.UI;
using System.Xml.Serialization;
using System.Runtime.InteropServices;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.WebControls;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;
namespace Webpartbasics
{
[Guid("c07e5146-b025-4f9b-b0a4-a0fc5cb2cfd6")]
public class Webpartbasics : System.Web.UI.WebControls.WebParts.WebPart
{
//varible declaration
private string _strResult;
private TextBox _tbxText;
private Button _btnShow;
private Label _lblErrMsg;

/// <summary>
/// 1 st EVENT IN WEB PART MANAGER
/// During the initialization, configuration values that were marked as webbrowsable
/// and set through the webpart task pane are loaded to the webpart
/// </summary>
/// <param name="e"></param>
protected override void OnInit(EventArgs e)
{
try
{
this._strResult += "onInit Method <br>";
base.OnInit(e);
}
catch (Exception ex)
{
this._lblErrMsg.Text = ex.Message.ToString();
}

}
/// <summary>
/// 2 nd EVENT IN WEB PART MANAGER
///
/// Viewstate is a property inherited from System.Web.UI.Control .
/// The viewstate is filled from the state information that was previously serialized
/// would like to persist your own data within webpart
/// </summary>
/// <param name="savedState"></param>
protected override void LoadViewState(object savedState)
{
try
{
_strResult += "LoadViewState<br>";
object[] viewstate = null;
if (savedState != null)
{
viewstate = (object[])savedState;
base.LoadViewState(viewstate[0]);
_strResult += (string)viewstate[1] + "<br>";
}
}
catch (Exception ex)
{
this._lblErrMsg.Text = ex.Message.ToString();
}
} /// <summary>
/// 3 rd EVENT IN WEB PART MANAGER
/// All of the constituent controls are created and added to the controls collection
/// </summary>
protected override void CreateChildControls()
{
try
{
_strResult += "CreateChildControls<br>"; //creating error label controls
this._lblErrMsg = new Label();
this._lblErrMsg.ID = "lblErrMsg";
this._lblErrMsg.Text = string.Empty;
this.Controls.Add(_lblErrMsg); //creating text controls
this._tbxText = new TextBox();
this._tbxText.ID = "tbxText";
this._tbxText.Text = string.Empty;
this.Controls.Add(_tbxText); //creating button controls
this._btnShow = new Button();
this._btnShow.ID = "btnShow";
this._btnShow.Text = "Check Text Value";
this._btnShow.Click += new EventHandler(_btnShow_Click);
this.Controls.Add(_btnShow);
}
catch (Exception ex)
{
this._lblErrMsg.Text = ex.Message.ToString();
}
}
/// <summary>
/// butoon click event
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void _btnShow_Click(object sender, EventArgs e)
{
try
{
this._strResult += "button click event has fired<br>";
}
catch (Exception ex)
{
this._lblErrMsg.Text = ex.Message.ToString();
}
}
/// <summary>
/// 4 th EVENT IN WEB PART MANAGER
/// Perform actions common to all requests, such as setting up a database query
/// At this point, server controls in the tree are created and initialized, the state is
restored,
/// and form controls reflect client-side data.
/// </summary>
/// <param name="e"></param>
protected override void OnLoad(EventArgs e)
{
try
{
this._strResult += "Onload<br>";
base.OnLoad(e);
}
catch (Exception ex)
{
this._lblErrMsg.Text = ex.Message.ToString();
}
}
/// <summary>
/// 5 th EVENT IN WEB PART MANAGER
/// Perform any updates before the output is rendered.
/// Any changes made to the state of the control in the pre-render phase can be
saved
/// while changes made in the rendering phase are lost.
/// </summary>
/// <param name="e"></param>
protected override void OnPreRender(EventArgs e)
{
try
{
this._strResult += "OnPreRender<br>";
base.OnPreRender(e);
}
catch (Exception ex)
{
this._lblErrMsg.Text = ex.Message.ToString();
}
}
/// <summary>
/// 6 th EVENT IN WEB PART MANAGER
/// store cutom data within a web part's viewstate
/// The ViewState property of a control is automatically persisted to a string
object after this stage.
/// This string object is sent to the client and back as a hidden variable.
/// For improving efficiency, a control can override
/// the SaveViewState method to modify the ViewState property.
/// once viewstate is saved,the control webpart can be removed from the memory
of the server.
/// webpart receives notification that they are about removed from memory
through dispose event
/// </summary>
/// <returns></returns>
protected override object SaveViewState()
{

this._strResult += "SaveViewState<br>";
object[] viewstate = new object[2]; viewstate[0] = base.SaveViewState();
viewstate[1] = "MyTestData";
return viewstate;
} /// <summary>
/// 7 th EVENT IN WEB PART MANAGER
/// Generate output to be rendered to the client.
/// you can create user interface of your webpart using html table.
/// You can apply your css classes here itself
/// </summary>
/// <param name="writer"></param>
public override void RenderControl(HtmlTextWriter writer)
{
try
{
//this method ensure all created child controls
EnsureChildControls();
this._strResult += "RenderControl<br>";
//table start
writer.Write("<table id='tblTest'align='center' cellpadding='0' cellspacing='0'
border='1' width='100%'>");
writer.Write("<tr>");
writer.Write("<td>");
writer.Write(_strResult);
writer.Write("</td>");
writer.Write("</tr>"); //row 2
writer.Write("<tr>");
writer.Write("<td>");
this._tbxText.RenderControl(writer);
writer.Write("</td>");
writer.Write("</tr>"); //row 3
writer.Write("<tr>");
writer.Write("<td>");
this._btnShow.RenderControl(writer);
writer.Write("</td>");
writer.Write("</tr>"); //row 4
writer.Write("<tr>");
writer.Write("<td>");
this._lblErrMsg.RenderControl(writer);
writer.Write("</td>");
writer.Write("</tr>");
writer.Write("</table>");
//table end
}
catch (Exception ex)
{
this._lblErrMsg.Text = ex.Message.ToString();
}
}

/// <summary>
/// 8 th EVENT IN WEB PART MANAGER
///
/// Perform any final cleanup before the control is torn down.
/// References to expensive resources such as database connections must be
/// released in this phase.
/// </summary>
public override void Dispose()
{
base.Dispose();
}

/// <summary>
/// 9 th EVENT IN WEB PART MANAGER
///
/// Perform any final cleanup before the control is torn down.
/// Control authors generally perform cleanup in Dispose and do not handle this
event
/// The webpart removed from memory of the server
/// Generally webpart developer do not need access to this event because all
/// the clean up should have been accomplish in dispose event
/// </summary>
/// <param name="e"></param>
protected override void OnUnload(EventArgs e)
{
base.OnUnload(e);
}
}
}

Deploy File Upload Web Part in the SharePoint Server


• Right click solution file then select properties.
• Select Debug --> Start browser with URL selects your respective SharePoint Site.
Select Signing Option

• Ensure the strong name key and sign the assembly check box.
• Right Click properties and select Deploy.

• The Web Part is automatically deployed to the respective site.


• Deploy will take care of .Stop IIS, buliding solution, restarting solution, creating GAC,
restarting IIS like that.
• Now you should have this web part in your SharePoint page.
The final web part is added to the site. All events displayed in web part have order.

Features of WSS 3.0 and MOSS 2007


Introduction

This Article describes features of windows SharePoint services (WSS 3.0) and MOSS
2007. It describes basic difference between WSS 3.0 and Moss 2007.

Features of WSS 3.0

WSS 3.0 is built on top of ASP.NET, and supports Master Page and Site navigation. It is an
application framework. WSS improves team productivity.

Team site

Primarily designed to facilitate collaboration among teams through web sites Secure,
Document centric site, tracking process, sharing document, communicating with colleagues,
task list, contact list, discussion forums.

Administration model enhancements

Windows SharePoint Services 3.0 includes several enhancements to the administration


model that helps IT organizations implement management plans and performs
administrative tasks more effectively and efficiently.
Collaborate Easily and Effectively

Windows SharePoint Services 3.0 provide a single workspace for teams to coordinate
schedules, organize documents, and participate in discussions-within the organization and
over the extranet.

Windows SharePoint Services are used as a platform to build rich, flexible, and scalable
Web-based applications and Internet sites specific to the needs of your organize.

Additional Features come with MOSS 2007

Take advantage of its integration with Microsoft Office SharePoint Server 2007 that expands
platform services and common framework for document management exposed by Windows
SharePoint Services to offer enterprise-wide functionality for records management, search,
workflows, portals, personalized sites, and more.

Use Microsoft Office SharePoint Designer 2007 to quickly and easily customize SharePoint
sites and build reporting tools and applications tailored to specific tasks without writing or
deploying new code.

My site personal site

The My Site personal site gives users an opportunity to aggregate information into "for me,"
"by me," and "about me."

User profiles and profile store

Allows each user to store profile information.

Audience targeting

Enables use of Web Part pages, Web Parts, and content to target distribution lists and
groups in addition to SharePoint audiences.

InfoPath forms services

Available in Microsoft Office SharePoint Server 2007 and Microsoft Office Forms Server 2007
InfoPath forms services make it possible to design Web-capable forms in Microsoft Office
InfoPath 2007 and distribute them on corporate intranets, extranets, or the Internet. Users
can fill out forms in a browser or HTML enabled Mobile device with no download or client
components needed.

Business Data Catalog (BDC)

Business Data Catalog tightly integrates external data into the Office SharePoint Server
2007 user experience, providing access to external data residing within backed LOB
applications, and enabling the display of and interaction with external data through a set of
Business Data Web Parts.

Difference between WSS 3.0 and MOSS 2007

WSS 3.0 MOSS 2007


Windows SharePoint Services (WSS3.0) MOSS is not free and it is installed on top of
comes free with Windows Server 2003. WSS 3.0.MOSS has both a server cost and a
client access license (CAL) cost.
WSS 3.0 offers all the standard site MOSS 2007 offers business intelligence
templates to build team sites, document features that allow you to track key
workspaces, blank sites, blogs, wikis, and performance indicators and build BI
meeting workspaces. dashboards into your team site.
WSS 3.0 can be used to create people and Moss is used as a super powerful content
group lists. management system, which aims to provide
content management, enterprise content
services and enterprise search.
You can integrate WSS 3.0 sites with Access Workflow can also be integrated into MOSS
2007, Excel 2007, Outlook 2007, Word 2007 2007.
and PowerPoint 2007.
It also serves as a platform for application Moss also offers My Sites, which are individual
development. Including such IT resources as mini-sites that can be set up to show who in
portals, team workspaces, e-mail, presence your company you're connected to, what your
awareness, and Web based conferencing, tasks and skills are, your contact information,
Windows SharePoint Services enables users and more.MOSS 2007 is the portal system,
to locate distributed information quickly and comparable to SharePoint Portal Server 2003.
efficiently, as well as connect to and work It brings a wealth of built-in functionality and
with others more productively. interoperability to a company's intranet over
and above the functions of WSS 3.0.
Create Site Collection: Select template will Create Site Collection:Select template will give
give minimum options it's like Collaboration more options it's like Collaboration, Meetings,
and Meetings. Enterprise, Custom and Publishing Only WSS
3.0

Navigation

By default both WSS and MOSS have a simple navigation system that uses tabs across the
top to access sites along with the quick launch area on the left hand side to access content
element within a site.This information presented in site collection.

Windows SharePoint Services 3.0 provides the following new features to improve
site
• Navigation through User-aware links; for example, removing the Settings links for
users who cannot make particular changes, a capability that is provided through "link
trimming".
• Breadcrumbs to provide users with additional information about their location within
a site collection.
• Customization of the top navigation bar, ranging from adding and removing links to
adding Microsoft JScript drop-down menus and fly-outs, which is provided by new
shared navigation and master pages. Such menus can only be enabled by modifying
a master page; there is no built-in support for enabling these menus.
• Customization of the left navigation bar, which includes adding and removing links to
adding JScript drop-down menus and fly-outs, which is provided through ASP.NET
master pages and navigational controls such as the SiteMapPath, Menu and TreeView
controls. Such menus can only be enabled by modifying a master page; there is no
out-of-box support for enabling these menus.
• Common navigation bars provided through master pages.
Content Management with work flow

Content Characteristics

Microsoft Windows SharePoint Services 3.0 is designed to host content and applications that
support such business needs as communication, collaboration, analysis, process, and
knowledge management. Across those diverse functions, not all content is created equal.
Imagining a spectrum of content characteristics.

Content Database is a SQL server 2005 database that maintain all of the webpage
definitions, documents, lists and security information.

Structured content Unstructured content


Made available for long-term consumption Shorter-term lifecycle
Little-to-no support for collaboration Support for collaboration
Process-driven Process-driven
Work Flow

Work flow is nothing but automated process.The workflow functionality in Windows


SharePoint Services 3.0 is built on the Windows Workflow Foundation (WF), a Microsoft
Windows platform component that provides a programming frastructure and tools for
development and execution of workflow-based applications.
The WF run-time engine provides the services that every workflow application needs, such
as sequencing, state management, tracking capabilities, and transaction support.

Document libraries also support an event system that you can tap in to
programmatically.These events can call into .net assemblies when new document are placed
in a library, modified, or deleted.The version of WSS also comes with its own work flow
engine based on WWF (Windows workflow foundation), the engine provides simple work
flow process such as document approval out of box.

User can develop more sophisticated workflows using the SharePoint designer (Microsoft
front page). We can create custom workflows with visual studio 2005 and harness all the
power of .NET Framework

List
Task list, list of contacts .Previous version of WSS, list used a different underlying
infrastructure than document libraries.
In the WSS 3.0 version both are same.List also capable of raising events that you can trap
in code. List also can participate workflow process.

All the files are uploading in respective share point custom list.

Custom users profile property in MOSS 2007


Introduction
Most of the times you need to add custom user properties in MOSS 2007 during
implemetation of sharepoint in companies. Here I do have step by step property addition
tutorial for MOSS developers.
Note: Click images for bigger images.

Here are some steps for adding user profile property.


• Go to Shared Services Administration --> SharedService1
• Under User Profiles and My Sites click on User profiles and properties

• Click on Add Profile Property

• Enter property name, description & display name


• In policy settings set the default privacy setting as per your choice like My Manager,
MyWorkGroup, Everyone etc.

Here I am going to select [Only Me]


• In Property Import Mapping you can map this property to Active Directory property
as well.

Here I am not going to map it.


• Now click come back to User profile and properties and click View User Profile

• Select preferred name


• Here I am going to put [Tariq Younas] in search

• Click on it and press Edit

My profile is open as you can view my AccountName


Here state is now appeared & it is allowing to show [Only ME]

Now I am putting and going to Save and close


• As I entered in State Filed

• Now Save and close

Now your User Profile Property has been added.


MOSS 2007 Search Customization using Sharepoint designer
In our company we had a requirement to customize employee searching in MOSS 2007. We
were asked to show employee information with image in this way
-----------------------------------------------------------
Name: Tariq Younas
Ext:1122, Email: tariq.younas@gmail.com
Department: CTS, P&L: Intech, Office: Lahore
Designation: Software Engineer
-----------------------------------------------------------
I did some customization of People Search in MOSS 2007 Using Microsoft Office SharePoint
designer 2007.
Microsoft Office SharePoint designer is great tool to customization.
Given below is Step by Step Search Customization
Let's start........
1- Click to edit search page

2- Click on Edit XSL Editor and paste the following xml code
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xmp><xsl:copy-of select="*"/></xmp>
</xsl:template>
</xsl:stylesheet>
3- Replace the existing XSL markup from the Search Core Results Web Part with the
following snippet
4- It will give you raw XML output during search
5- Now if you publish the page, you will see a result like the result in the following picture,
which illustrates how the raw XML could look: copy it

6- Take a blank text file and paste it with XML extension now it will look like this

7- Open SharePoint designer and click on new aspx page


8- From SharePoint designer menu items click on Data View & insert Data view

9- Now click to add temp.xml and add your XML in SharePoint designer
10- After importing click on XML then there will option to show data
11- On right side pane you will see data
12- Just drag and drop you data fields as per your requirements

13- Click on the split window on aspx page. A XSL code will appear
14- Copy code between two tags to next
15- Edit your search page and paste this code in XSL editor and apply

16- Search like employee name

As I searched tariq younas. Now results will be like this


Happy Search Customization

Custom Theme Creation and applying in SharePoint (MOSS


2007)
Site Theme
• Site Theme is a way to control Look and Feel of a SharePoint site.
• It uses Cascading Style Sheets(CSS files) to define how the site looks.

• There are default 18 Site Themes.


• Master Pages are the other way to change Look and Feel of site.
• Site Theme changes color schemes of entire site, whereas Master Pages changes
only chromes like navigation, quick launch etc.
• Custom Site Theme could be created.
• User could add new Site Theme
• All the preconfigured themes in SharePoint are stored in the File System on the
SharePoint Server.
• Site Theme could be change as

Site Setting-> Look and Feel -> Site Themes


Steps to create custom Site Themes and apply that
1. Log on the SharePoint server as an Administrator.
2. Open the folder

C:\Program Files\Common Files\Microsoft Shared\web server


extensions\12\TEMPLATE\THEMES
3. This folder contains number of folders; each with the name matches one of the themes in
administrative page.
4. Copy one of existing folder.
5. Rename copied folder with any arbitrary name. Here I am copying JET folder, and pasting
it in same folder. Renaming it to TEST. (Make sure at time of renaming, name is in Upper
Case).

6. Open the new folder (TEST in this case). Search for .INF file. Here we have copied JET
folder and rename that as TEST folder. So Inside TEST folder, we will get JET.INF. Rename
JET.INF to TEST.INF. (Right click and Rename).
7. Edit TEST.INF with notepad. Change all Jet to Test. When TEST.INF will open in Notepad,
you will find
[info]
Title=Jet
.
.
.
.
[titles]
1031=Jet
1036=Jet
...
Something likes that. Just change all Jet to Test. Here Test may not be in Upper Case. To
change, click on Edit->Replace. Then Save the file TEST.INF

8. Now open the file SPTHEMES.XML. This file could be find at

C:\Program Files\Common Files\Microsoft Shared\web server


extensions\12\TEMPLATE\LAYOUTS\1033
Open file SPTHEMES.XML in notepad. Here <TEMPLATE> tag is defined for each site themes.
Just copy and paste one <TEMPLATE> tag.
<Templates>
<TemplateID>Jet</TemplateID>
<DisplayName>Jet</DisplayName>
<Description>Jet has a gray frame with blue control areas and yellow
highlights.</Description>
<Thumbnail>images/thjet.gif</Thumbnail>
<Preview>images/thjet.gif</Preview>
</Templates>
Paste it as

<Templates>
<TemplateID>Test</TemplateID>
<DisplayName>Test</DisplayName>
<Description>This is Testing Site Theme.</Description>
<Thumbnail>images/Eye.gif</Thumbnail>
<Preview>images/Eye.gif</Preview>
</Templates>
Change <Template ID>, <Display Name>, <Description> <Preview>. Here I am changing
preview to Eyes.gif. Make sure Eyes.GIF is present in folder
C:\Program Files\Common Files\Microsoft Shared\web server
extensions\12\TEMPLATE\IMAGES. If Eye.GIF is not available, Paste Eye.Gif in this
folder. Whatever image you want to use with site theme. First copy and paste that Image in
this folder. Here Eye.GIF is my own image. I have copy and pasted this image in Image
folder.
9. Open the site in SharePoint designer
10. Open Edit ->View Folder. It will display all folder name. Delete _Theme folder.
11. Save the site in SharePoint designer
12. Click on Start->Run.
13. Type IISRESET. This will restart the IIS server.
14. Go to Site Action-> Site setting -> Look and Feel -> Site Themes
15. Select TEST site theme. And apply it.

16. Now open the Site in SharePoint designer.


17. Open the folder list of site in SharePoint designer.
18. Browse through _Theme folder.
19. Search for custom theme folder. In this case it is Test
20. Open the Test1011-65001.css file.
21. Modify this file accordingly. This change would be depicted in Sites.
22. Save this file.
23. Now open Test folder or custom theme folder. Location of this folder is

C:\Program Files\Common Files\Microsoft Shared\web server


extensions\12\TEMPLATE\THEMES

24. Open Theme.css file


25. Replace content of Themse.css file with content of Test1011-65001.css file and save it.
26. Now go to site -> Site Action -> Site Setting -> Look and Feel -> Site Theme , select
custom theme , apply it.....

State Machine Work flow Discussion


Introduction

All characters in this article are fictional and any resemblance to live or dead is
purely coincidental.
This is a nice talk between Mr. RC and Mr. Shiv about state machine work
flow. RC starts talking about an order project and they end up in a nice
discussion which gives us step by step approach of how to execute a state
machine work flow.
This article was written in a straight half & hour session so please excuse for
my English as it's my second language and for any spelling mistakes.so guys
enjoy State machines.
The State machine Work flow discussion
Ramprasad Chaurasiya:- Hi Shiv how's things ?
Shivprasad Koirala :- Doing great RC ( Ramprasad Chaurasiya ) ?
RC: - You have written more than 60 articles that's huge, looks like you are
copy pasting articles from MSDN and other sources.
Shiv: - Hmmm, can we talk something better before you reveal me
completely J ?.
RC: - I was reading your article on WWF. I am working currently on an order
processing project and I am bit confused how the workflow aspect of the
project should be approached.
Shiv: - Can you explain me the workflow part of your order project?
RC: - Ok here's the requirement for the order and also I have drawn a small
sketch of how the work flow looks like:-
• The work flow starts by user placing an order.
• Accounts department logs in and checks if payment is made for the
order. If the payment is not made then they mark the order as
cancelled and it's sent to the user for payment.
• Once the user makes the payment the order is moved to a valid order
placed stage again.
• Purchase department logs in and check if the product is in stock for
the order.
• If the product is in Stock the purchase department person enters
saying the product is Instock and the order is then ready for dispatch.
• Courier department logs in and check if the address of the order is
proper. If address is not proper the order is moved to a pending stage
and sent to the end user for address correction.
• In pending stage if the user corrects the address the order is then
moved back to ready for dispatch.
• If the order is dispatched and received by the end user the delivery
person marks the order as delivered.
Shiv: - Hmmm, it's an interesting work flow. This can be very easily solved
by using Windows work flow foundation. The first step we need to decide is
which kind of work flow we need to choose for the above.
RC: - ohhh , Are there different kind of work flows in Windows Work flow.
Shiv :- Primarily there are two kinds of work flows in WWF and depending
on the nature we need to choose the work flow accordingly.
RC:- That's funny I thought a work flow is just a collection of activities which
is executed depending on certain conditions. For instance below figure shows
a simple work flow which has customer activities, some if condition
depending on which the activities are executed. In other words what I want
to say is workflow is workflow what do you mean by types of work flow.
Shiv :- From windows work flow point of view there are two types of
workflow the first is a sequential work flow and the second is a state
machine work flow.
A sequential workflow has clear start and finish boundaries. Workflow
controls execution in Sequential workflow. In sequential execution, one task
is executed after other. Sequential workflow is more rigid in format and
execution path has a determistic nature.
A State machine workflow is more dynamic in nature. Workflow has states
and the state waits for events to help it move to next state. In State
machine execution path is undetermestic nature.
Below figure shows visual conceptualization of fundamentals. You can see in
Sequential workflow the execution path is very determent. Shiv performs the
entire task sequentially and these tasks are very determent. Now have a
look at the second workflow. Every state goes to other state when it receives
some external events. For instance when Shiv is seeing star trek there is an
event of flashing news which triggers him to see the flashing new.
RC :- In other words what we can say is that if the work flow controls the
execution then its sequential and if there is some external factor which
controls the work flow then it becomes a state machine workflow.
Shiv: - Yes, that's a good summary. Looks like you have started thinking in
terms of work flows. So now let's first decide your order project is of which
kind of work flow.
RC (Thinking):- Well I think it's a sequential work flow ,as the work flow has
a control on the execution.
Shiv :- Ok , so let me redraw your workflow diagram , below is your
changed diagram. You can see there are so many inputs from the user which
changes your workflow. For instance the accounts department depending in
the payment diverts the workflow, purchase department depending on stock
value divert the flow and same holds true for the courier person.
RC: - I understand where you are coming from. My work flow is not in
control of himself. Ok, I buy back my point my order project is of a state
machine work flow.
Shiv :- A few comments on work flow type before we move ahead. Many
architects get carried with sequential work flow. If you see in your
application that depending on user inputs your workflow is changing then it's
a good idea to think about state machine. Ok, let me comment from more
practical point of view. In actual projects it's a combination of these types
rather than just one type. In other words you can have a broader state
machine work flow which has lot of sequential work flow in between and vice
versa.
RC :- What I also think is we should also look from the domain perspective
what kind of work flow it actually looks like. Ok, this sounds good. So how
can we now move ahead?
Shiv :- So let's first try to visualize what are the important elements in state
machine work flow. There three important things in state machine work flow
initial state , action and the final state. You can see from the figure a simple
example of state machine. So you have a initial state, a action happens and
it moves to the some other state. For instance a bulb is first in a on state
and then switch off and it moves to a off state.

RC :- Ok , I am trying to get a feel of state machines.


Shiv :- So let's first visualize the whole order work flow from these three
aspects. So below is a table which shows the whole work flow from the
above three perspective.
First state Action / Event Next state
Order placed InStockEvent Order Approved
Order placed NotPaidEvent Order cancelled
Order cancelled PaymentMadeEvent Order placed
Order Approved AddressNotProperEvent Order Pending
Order pending AddressCorrectedEvent Order Approved
Order Approved DispatchedEvent Order Delivered
RC :- Ok , that a good visualization. So what I understand is we have in all 4
different states and some 6 to 7 events. I think our state machine diagram
will look something as below.

Shiv :- nice you are catching up on state machines. Ok now that we are
clear about our states and about our events. It's time to make the complete
work flow using WWF.
RC :- That sounds sense. I really do not like theory there should be some
practical implementation.
Shiv :- We will be using VS 2008 enterprise and .Net 3.5
RC :- Why not express edition ?.
Shiv :- Well WWF does not come with express edition.
RC :- Ok noted.
Shiv :- So before we move ahead and talk about practical. There's a one
more point we need to cover. In a typical work flow project we have two
important things one is the work flow and the second is the client which can
be windows or web application which consumes that work flow. In state
machine work flow we need to define a interface with all action. This
interface is the only thing which the work flow knows. So any client who
wants to invoke the work flow should make calls using this interface.

RC :- Ok , got it so this interface is the gateway to make calls to the work


flow.
Shiv :- Yes you said right. So below is our interface, so that the first step we
need to do create the interface. So we below figure shows that we have
created a "IOrder.cs" interface. The important point to note is we have
referenced "System.Workflow.Activities" and attributed the interface with
"ExternalDataExchange". We have then define all our events for the states in
this interface.
RC :- That's a pretty simple step.
Shiv: - Ok now do add new project and select "State machine work flow
library"
Shiv :- Once you create the work flow project you will be popped up with a
work flow designer as shown below. Now every state in a work flow had
events so go the work flow tool box and drag and drop the event driven
component on the state activity.

RC: - Hang on shiv, correct me if I am wrong. As per our discussion logically


every state should have events by which the state changes its action and it
should also have which next state it should move after the event.
Shiv :- You are absolutely right. So double click on the state and drag two
things one is handle external event which defines which event it should listen
to and second is the set state which says which is the next state it should
move on.

RC :- Ok great. So how should we define the events and next state for the
state.
Shiv :- If you remember we had defined a interface. It's time to start using
it. So go to the properties of the handle event and select the interface type
and the event for the same. The below figure shows the state is order placed
and we need to handle the instock event.

Shiv :- Now to specify the next state. So goto the property of the set state
component and specify target state name.
Shiv :- So create states , create event we need to handle in the states and
the next state. You will see you end up in to something like as shown below.
RC :- The visuals look great and appealing.
Shiv :- Yeah! The most important part for WWF is to get a feel of the work
flow development..
RC :- Ok , this sounds good. What next.
Shiv :- One of the most important points we have forgotten is we need to
make our concrete class which will be called by the client. So let's implement
the interface Iorder. You can see the below class clsOrder which implements
IOrder. We have just displayed simple console messages. Remember this
concrete class will called by client and all the below methods of the class will
be invoked by the client. This class internally calls the interface which in turn
invoked the work flow engine.
public class clsOrder : IOrder
{
#region IOrder Members
public event EventHandler<ExternalDataEventArgs> NotPaid;
public event EventHandler<ExternalDataEventArgs> InStock;
public event EventHandler<ExternalDataEventArgs> PaymentMade;
public event EventHandler<ExternalDataEventArgs> Dispatch;
public event EventHandler<ExternalDataEventArgs> AddressNotProper;
public event EventHandler<ExternalDataEventArgs> AddressCorrected;
public event EventHandler<ExternalDataEventArgs> ProductStocked;
#endregion
public void CallNotPaid(ExternalDataEventArgs args)
{
NotPaid(null, args);
Console.WriteLine("This order is not paid");
}
public void CallInStock(ExternalDataEventArgs args)
{
InStock(null, args);
Console.WriteLine("Product is InStock");
}
public void CallPaymentMade(ExternalDataEventArgs args)
{
PaymentMade(null, args);
Console.WriteLine("Payment is made for this Order");
}
public void CallDispatch(ExternalDataEventArgs args)
{
Dispatch(null, args);
Console.WriteLine("Dispatch the Order");
}
public void CallAddressNotProper(ExternalDataEventArgs args)
{
AddressNotProper(null, args);
Console.WriteLine("Adress is not Proper");
}
public void CallAddressCorrected(ExternalDataEventArgs args)
{
AddressCorrected(null, args);
Console.WriteLine("Adress is corrected");
}
public void CallProductStocked(ExternalDataEventArgs args)
{
ProductStocked(null, args);
Console.WriteLine("Product is stocked");
}
}

RC :- Oh ok. So this class will be consumed by the client right.


Shiv :- Yes that absolutely right. So we need to create the work flow
instance using the work flow runtime and start the instance. We also need to
add the order class clsorder object as a service.

WorkflowInstance objWorkFlowInstance;
WorkflowRuntime objWorkFlowRuntime = new WorkflowRuntime();
clsOrder objOrder = new clsOrder();
ExternalDataExchangeService objService = new ExternalDataExchangeService();
Guid InstanceId = Guid.NewGuid();
objWorkFlowRuntime.AddService(objService);
objService.AddService(objOrder);
objWorkFlowInstance =
objWorkFlowRuntime.CreateWorkflow(typeof(OrderWorkFlow.WorkflowOrder), null,
InstanceId);
objWorkFlowInstance.Start();

RC :- Ok , so how will the complete client code look like.


Shiv :- So below is the code snippet which shows how our client code looks
like. What I have done is I am taking inputs and invoking the work flow
methods accordingly.
WorkflowInstance objWorkFlowInstance;
WorkflowRuntime objWorkFlowRuntime = new WorkflowRuntime();
clsOrder objOrder = new clsOrder();
ExternalDataExchangeService objService = new ExternalDataExchangeService();
Guid InstanceId = Guid.NewGuid();
objWorkFlowRuntime.AddService(objService);
objService.AddService(objOrder);
objWorkFlowInstance =
objWorkFlowRuntime.CreateWorkflow(typeof(OrderWorkFlow.WorkflowOrder), null,
InstanceId);
objWorkFlowInstance.Start();
Console.WriteLine("Work flow started");
ExternalDataEventArgs objDataEventArgs = new
ExternalDataEventArgs(InstanceId);
objDataEventArgs.WaitForIdle = true;
Console.WriteLine("1 - This order is not paid");
Console.WriteLine("2 - Product is InStock");
Console.WriteLine("3 - Payment is made for this Order");
Console.WriteLine("4 - Dispatch the Order");
Console.WriteLine("5 - Adress is not Proper");
Console.WriteLine("6 - Adress is corrected");
Console.WriteLine("7 - Product is stocked");
Console.WriteLine("Enter Appropriate inputs ");
int intValueEntered = 0;
while (intValueEntered < 7)
{
intValueEntered = Convert.ToInt16(Console.ReadLine().ToString());
if (intValueEntered == 1)
{
objOrder.CallNotPaid(objDataEventArgs);
}
else if (intValueEntered == 2)
{
objOrder.CallInStock(objDataEventArgs);
}
else if (intValueEntered == 3)
{
objOrder.CallPaymentMade(objDataEventArgs);
}
else if (intValueEntered == 4)
{
objOrder.CallDispatch(objDataEventArgs);
}
else if (intValueEntered == 5)
{
objOrder.CallAddressNotProper(objDataEventArgs);
}
else if (intValueEntered == 6)
{
objOrder.CallAddressCorrected(objDataEventArgs);
}
else if (intValueEntered == 7)
{
objOrder.CallProductStocked(objDataEventArgs);
}
}

RC :- Ok let me run it. Great I can see the order is first placed , then when I
entered 2 the product moved in stock and when I did dispatch it moved in a
delivered state.
Shiv :- The most important part in work flow is the work flow logic is now in
your work flow project and your business component are self contained and
they are doing their own activity.
RC :- Great man, From where can I download the Source code? Tonight at
home I would like to see the same.
Source Code

Shiv :- You can find the Source code at the top of this article.

In case you are still not clear with work flow basic you can go and read Windows Workflow
Foundation (WWF).

Das könnte Ihnen auch gefallen