Monday, 18 October 2010

Building a Document Management System with Sharepoint 2010 - Part 4 - User Interfaces for DMS-Clients ( Menu Items )

In a Document Management System the client-side is one of the cores of the infrastructure. We want the users to perform operations in our system, but that is not an easy task. We have to be aware that some users are  qualify when they use new technologies, but another ones do not really care about or simply they do not have time to learn it. For this reason we have to find the right approach for every single user profile, at the end of the day, if users are happy with the system and they find it quick and easy to use, we have the job almost done.

In this chapter I am going to talk about how to define, program and deploy "Menu Items" in Sharepoint 2010. Menu Items are custom actions incorporated into the built-in Sharepoint 2010 user interface. As examples, the Site actions menu is built from a number of built-in, context-sensitive actions that appear as menu item links.

Sample of Menu Items:

A menu item is a basic XML document inside of the XML element file. This is attached into a feature and it can be deployed with Visual Studio 2010. 

Sample of an elements.xml (Click in the code to make it bigger)


As you can see the element "CustomAction" is the one who takes control of the Menu Item, so It is very important to understand what we can do with it before going to the our little example. This is how basically we can extend our menu item:


  RequiredAdmin = "Delegated | Farm | Machine"
  ControlAssembly = "Text"
  ControlClass = "Text"
  ControlSrc = "Text"
  Description = "Text"
  FeatureId = "Text"
  GroupId = "Text"
  Id = "Text"
  ImageUrl = "Text"
  Location = "Text"
  RegistrationId = "Text"
  RegistrationType = "Text"
  RequireSiteAdministrator = "TRUE" | "FALSE"
  Rights = "Text"
  RootWebOnly = "TRUE" | "FALSE"
  ScriptSrc = "Text"
  ScriptBlock = "Text"
  Sequence = "Integer"
  ShowInLists = "TRUE" | "FALSE"
  ShowInReadOnlyContentTypes = "TRUE" | "FALSE"
  ShowInSealedContentTypes = "TRUE" | "FALSE"
  Title = "Text"
  UIVersion = "Integer">

For more information about every single CustomAction field, go to the Microsoft Website , Click here.

Let's go to start building a Menu Item. This Menu Item will be displayed under "Site Actions" and the main mission of this link will be related with the use of the current DMS site. It will basically display the list of the Top users who have been using our DMS site. This information will be very useful for secretaries who are dealing with documents all the time and need to know who has been accessing to the DMS, date + time.

The new menu it should look like this, as you can see there is a new item called "Top DMS Users":

When you click on "Top DMS Users" this screen should be displayed:


1- Open Visual Studio 2010.

2- File -> New -> Project -> Sharepoint -> 2010 -> Empty Project.

3- On the name text box type TopDMSUsers and click enter.

4- Deploy as a farm solution, and point the new project where you want to add the menu item.

5- On teh emty project Add->New Item->Empty Element and call it TopDMSUsers_Feature.

6- On the project, go to Elements.xml and add this code. (Click in the image if you can not see it properly)

8- This is how the Solution Explorer should look like:


9- Build and Deploy.

10- If you go to "Site Actions" you should be able to see the new Item.

Tips
Menu Items are deployed with features, so as soon as you deactivate the feature the Menu Item will disappear from the menu.

Conclusion
This small exercise has showed us how far we can go with the Sharepoint User Interface customization. In the next chapter we will learn how to interact with another members of the user interface.

Building a Document Management System with Sharepoint 2010 - Part 3

In the third part of Building a Document Management System with Sharepoint 2010 we are going to extend content type columns, so from now we will be able to create our custom columns for the documents. This part will be very useful for people want to extend the columns or metadata to the next level where a high level of customization is required.

Remember The availability of a site column follows the site hierarchy in SharePoint, which means that a site column is available on a site and all sites beneath that site. A site column is not available on SharePoint sites above the site on which the site column is created.

We will continue with out little sample, the "Bill" content type

1- In your SharePoint installation find the site where you want to add the column and click on there

2- On the Site Actions menu->Site Settings->Site columns.



3- On the Site Column Gallery page, click Create.


4- On the New Site Column page, enter a Name, "amount" and select a Type for the site column, "Currency".


5- On the New Site Column page, select Custom Columns from the Existing group drop-down list box.

6- Click Ok.

7- On the Site Actions menu->Site Settings->Content Types.

8- Click on "Bill".

9- Click on "Add from existing site columns".

10- Select on "select columns from:"-> Custom columns and then select amount. You can add it now. Click ok.


11- Your new column is ready to use!.

Conclusion
This tool is even more powerful than the out-of-the-box columns, but be sure you plan everything properly before using it, you could end having few surprises.


Building a Document Management System with Sharepoint 2010 - Part 2

In the second part of the series we will follow the process of how to create "Columns" in a content type. "Columns" will become of of they key parts of the Document Management System as it will be the fastest way of searching documents. Think in "Columns" as fields, every document will be the document itself (.doc) plus a bunch of fields. These fields can be customize by adding the out-of-the-box ones you need or by creating your own ones.

In this part we will concentrate in adding the out-of-the-box ones, leaving the custom ones for the next chapter.

1- Go to Site Actions -> Site Settings -> Site Content Types.

2- Look for "Custom Content Types".


3- Click on "Bill".

4- You should reach this screen "Site Content Type Information".


5- Click "Add from existing site columns"

6- Select "Select columns from:" -> Status indicators, and in "Available columns", select Description and click in Add. Now select "Core contact and Calendar Columns" and select Address and Company. Click on "Ok".

7- If you add a new "Bill" you should be able to see the columns. Don't forget to update the view to see the columns (if you to see them).


Conclusion
Columns in a Sharepoint DMS is one of the most powerful tools to manage the documents.

Bugs related
1- When you try to create a new document from "Shared documents"->"Documents" (ribbon)->"New Document"->the name of your document. you get this error:

'New Document' requires a Microsoft SharePoint Foundation-compatible application and web browser. To add a document to this document library, click the 'Upload Document' button.

Work around from Microsoft: Click here or follow these instructions:
1- Start OneNote 2010.
2- On the File tab, click New.
3- Under Store Notebook On, click Network.
4- Type a name for the notebook in the Name field.
5- Under Network Location, select the SharePoint location where you want to add the OneNote notebook.
6- Click Create Notebook.

2- If this does not work, the problem could be in your browser, Internet Explorer 8. Apparently there are some tasks that Internet Explorer 8 64bit can not perform like the 32bit version. Internet Explorer 32bit supports all the tasks. I found this problem in the 64bit version. Click here for a full list of browsers and Sharepoint 2010 limitations, this following list is just for Internet Explorer 64bit:


Feature


Limitation


Connect to Outlook, Connect
to Office, and Sync to SharePoint Workspace


Works with an ActiveX control
and the stssync:// protocol. Therefore, functionality may be limited without
an ActiveX control, such as the one that is included in Microsoft Office
2010. The feature also requires an application that is compatible with the
stssync:// protocol, such as Microsoft Outlook.


Datasheet view


Requires a 64-bit ActiveX
control. Microsoft Office 2010 does not provide a 64-bit version of this
control.


Edit in Microsoft Office
application


Requires a 64-bit ActiveX
control. Microsoft Office 2010 does not provide a 64-bit version of this
control.


Explorer view


Removed in SharePoint
Foundation 2010. Libraries that have been upgraded from earlier versions of
SharePoint Foundation 2010 may still have Explorer views and these may not
work.


Export to Excel


Downloads a file with an .iqy
extension to the Web browser. If Microsoft Excel is not installed, and if no
other application is configured to open this file, then this feature will not
work.


File upload and copy


Requires a 64-bit ActiveX
control. Microsoft Office 2010 does not provide a 64-bit version of this
control.


Microsoft InfoPath 2010
integration


Requires a 64-bit ActiveX
control. Microsoft Office 2010 does not provide a 64-bit version of this
control.


Microsoft PowerPoint 2010
Picture Library integration


Requires a 64-bit ActiveX
control, such as the one that is delivered in Microsoft Office 2010. The user
can use the following workarounds when no control has been installed:

·        
If a user wants to upload multiple pictures in a picture
library, the user must upload one picture at a time by using Upload.aspx.

·        
If a user wants to edit a picture in a picture library, the user
must download the picture, edit it, and then upload the picture to the
picture library.

·        
If a user wants to download more than one picture from a picture
library, the user must download one picture at a time by clicking on the
picture link.


Microsoft Visio 2010 diagram
creation


Requires a 64-bit ActiveX
control. Microsoft Office 2010 does not provide a 64-bit version of this
control.


New Document


Requires a 64-bit ActiveX
control. Microsoft Office 2010 does not provide a 64-bit version of this
control. Although the New
Document
command may not work, you can use the Upload
Document functionality. If you install and configure Office Web Applications
on the server, the New
Document
command works, and you can create an Office document
in your browser.


Send To


Can leverage a 64-bit ActiveX
control. Microsoft Office 2010 does not provide a 64-bit version of this
control. Without the control, files cannot be sent from one SharePoint farm
to another SharePoint farm. However, files can still be sent from one site to
another site.


Signing Forms (InfoPath Form
Services)


Requires a 64-bit ActiveX
control. Microsoft Office 2010 does not provide a 64-bit version of this
control.


Spreadsheet and Database
integration


Require a 64-bit ActiveX
control. Microsoft Office 2010 does not provide a 64-bit version of this
control. The user can use the following workarounds when no control has been
installed:

·        
If a user wants to edit a document, the user must download the
document, edit it, and then save it back to the server.

·        
In a list that requires a document to be checked out for
editing, a user must use the Edit
menu to check out the document, edit it, and then check it in by using the Edit menu.

·        
Export to spreadsheet. Users can export a SharePoint list as a
spreadsheet by clicking Export
to Spreadsheet
on the List
tab on the ribbon.


Web Part to Web Part
Connections


May require deactivation of
browsers pop-up blockers for SharePoint sites.