Sharing SharePoint Knowledge

Technical Solutions for SharePoint Server 2010

Posts Tagged ‘SharePoint 2010’

Creating Custom Document ID in SharePoint Server 2010

Posted by Chandrasekaran C N on August 14, 2010

 

Hi All,       

One of the new and exciting features of SharePoint Server 2010 is “Document ID Service”.       

What is Document ID Service and why it is important ?      

Document ID Service facilitates the users with the following functionalities       

  • Generate a unique ID to each documents in the docment library
  • Enable the users to search the documents using unique ID
  • Create custom document ID by extending the document ID provider

      
Many enterprise organizations require this feature, because they have a huge volume of documents to be managed and it is difficult to search  the documents as those documents are stored in different site collections.  Using Document ID feature, users can able to search the document anywhere in SharePoint using the unique document ID.      

Let’s walkthrough on how to enable the Document ID Service and to create a custom Document ID Service.       

Document ID Service is a site collection feature and it is not activated by default. So, first if we want to use the document ID feature, we need to activate that feature.       

Go to Site Settings -> Site Collection Features -> Document ID Service and click to activate button to activate.       

Document ID Service Feature Activation

Once the Document ID Service feature is activated,        

Go to Site Settings -> Go to Site Collection Administration Section -> Select Document ID Settings link       

Document ID Service Settings

In the above diagram, we can give a static value, which will be the unique document ID for the documents. These static value will be suffixed by an integer and for each document the integer value will be increased by one as shown in the below diagram.      

Generated unique document ID for documents

Using out-of-the-box feature, we can only provide some static value as unique document ID for all documents. But, this might not use for all the scenarios. We might need the unique ID’s generated dynamically based on some logic like current datetime, combination of document metadata, etc.,  To fulfill these scenarios, we can extend the OOTB document ID provider and create our own custom document ID provider.       

In order to create custom document ID provider, we need to use “Microsoft.Office.DocumentManagement” assembly, which is available only in SharePoint Server Standard license and above.       

Creation of Custom Document ID :-      

To create the custom document ID provider, open up the favorite Visual Studio 2010 IDE and select Empty SharePoint Project. Make sure that you have selected the .NET Framework 3.5 version and not .NET Framework 4.0 version.      

Right click the Features folder and add a feature called “CustomDocumentIDService” and provide appropriate title and description for the feature. Finally, change the scope of the feature to Site. After creating a feature, right the click the feature and add a feature receiver as shown in the below diagram       

Visual Studio Solution for Custom Document ID Provider

In order to create custom document ID provider, we need to implement an abstract class namely “DocumentIDProvider”, which provides the following methods and property    

GenerateDocumentID  GenerateDocumentId method is used to do our logic on generating the custom document ID. It consists of a single input parameter SPListItem, so that we can generate the document ID based on the metadata of the SPListItem. 

GetDocumentUrlsById  This method is used to implement a custom search and returns an array of URLs that point to the documents. This method is used in conjunction with DoCustomSearchBeforeDefaultSearch property. When this property is true, this method is called before default SharePoint search and returns the array of string of URLs. If the property is false, first the default SharePoint search called, if it does not return any value, then it executes this method to return the string of URLs.

GetSampleDocumentIdText This method is used to set the default document id

DoCustomSearchBeforeDefaultSearch Returns either true or false, if true, the GetDocumentUrlsById() method called before default SharePoint search happens , otherwise, default SharePoint search executes, if no result returns, it will call the GetDocumentUrlsById() method. 

In this sample, we will generate the unique document ID as “CustomDocID” and suffixed with the current date & time. Here is the code that generates the unique document ID

Custom Document ID Provider

 Once the generation logic is defined, we need to set custom document ID provider to the site collection, to do this, we need to have a feature receiver class as shown below

 

 

In the above code, SetProvider() method to set the custom document ID provider and SetDefaultProvider() method to revert back to default document ID Provider. After successful deployment of the custom document ID provider, below screen shows custom document ID feature

Custom Document ID Provider Feature

Once this feature is activated, the default document ID provider is disabled and SharePoint identified that there is a custom document ID provider installed by displaying the message on the Document ID Settings page

Custom Document ID Provider

This message shows that the custom document ID provider installed successfully. Hereafter,  every document that is uploading in this site collection will have the custom document ID.

Custom Document ID Provider assigned to the documents

Thanks,

Chandrasekaran C N

Advertisements

Posted in Document ID Provider, SharePoint 2010 | Tagged: , | 2 Comments »

Inside Microsoft SharePoint Server 2010 – Book Excerpts

Posted by Chandrasekaran C N on August 2, 2010

Hi All,

The first four chapters of Inside Microsoft SharePoint Server 2010 is available on MSDN.

Chapter 1 : SharePoint 2010 Developer Roadmap
Chapter 2: SharePoint Foundation Development
Chapter 3: SharePoint Developer Tools in Microsoft Visual Studio 2010
Chapter 4: Sandboxed Solutions

To pre-order this book, visit Amazon site.

Happy Reading 🙂

Thanks,
Chandrasekaran C N

Posted in Book, SharePoint 2010 | Tagged: , | Leave a Comment »

Kerberos Authentication in SharePoint 2010

Posted by Chandrasekaran C N on July 16, 2010

Hi All,

Microsoft has published a whitepaper on Configuring Kerberos Authentication in SharePoint 2010 and other articles on technet related to Kerberos Authentication.

Thanks,
Chandrasekaran C N

Posted in Kerberos Authentication, SharePoint 2010 | Tagged: , | Leave a Comment »

Microsoft SharePoint 2010 – More Resources

Posted by Chandrasekaran C N on July 5, 2010

Hi All,

Last week, Microsoft has published more resources on Microsoft SharePoint 2010. Following are the details of those resources

Operations Guide for SharePoint Server 2010  — > http://tiny.cc/xshv8
Operations Guide for SharePoint Foundation Server 2010  — > http://tiny.cc/volz6
Technical Reference for SharePoint Server 2010 — > http://tiny.cc/v30c2
Planning Guide for SharePoint 2010 — > http://tiny.cc/97zwr
Developing Applications in SharePoint 2010  — > http://tiny.cc/rixf3

Hope these resouces are useful for all SharePointers… 🙂

Thanks,
Chandrasekaran C N

Posted in Resources, SharePoint 2010 | Tagged: , | Leave a Comment »

Microsoft TechEd 2010 SharePoint Sessions

Posted by Chandrasekaran C N on June 21, 2010

Hi All,

Here is the consolidated list of all SharePoint related sessions that were held at Microsoft TechEd 2010, North America.

Microsoft TechEd 2010 – SharePoint 2010 Sessions
Session Details
Code OSP301
Title Building RIA with Silverlight and SPS 2010
Session http://www.msteched.com/2010/NorthAmerica/OSP301
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP301.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP301.wmv
   
Code OSP302
Title Building Solutions with Business Connectivity Services
Session http://www.msteched.com/2010/NorthAmerica/OSP302
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP302.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP302.wmv
   
Code OSP303
Title Deploying and Upgrading to Microsoft Project Server 2010
Session http://www.msteched.com/2010/NorthAmerica/OSP303
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP303.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP303.wmv
   
Code OSP304
Title Developing and Branding with the New User Interface Features in Microsoft SPS 2010
Session http://www.msteched.com/2010/NorthAmerica/OSP304
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP304.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP304.wmv
   
Code OSP305
Title Developing Document Sets in Microsoft SPS 2010 Enterprise Content Management
Session http://www.msteched.com/2010/NorthAmerica/OSP305
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP305.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP305.wmv
   
Code OSP306
Title Developing Microsoft SPS 2010 Solutions with Claims Authentication
Session http://www.msteched.com/2010/NorthAmerica/OSP306
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP306.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP306.wmv
   
Code OSP307
Title Developing Office Business Applications with Microsoft Office 2010 and Microsoft SPS 2010
Session http://www.msteched.com/2010/NorthAmerica/OSP307
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP307.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP307.wmv
   
Code OSP308
Title Developing with Microsoft SPS 2010 Sandboxed Solutions
Session http://www.msteched.com/2010/NorthAmerica/OSP308
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP308.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP308.wmv
   
Code OSP309
Title Developing with REST and LINQ in Microsoft SharePoint 2010
Session http://www.msteched.com/2010/NorthAmerica/OSP309
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP309.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP309.wmv
   
Code OSP310
Title Fine Tuning Your Microsoft SPS 2010 Environment
Session http://www.msteched.com/2010/NorthAmerica/OSP310
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP310.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP310.wmv
   
Code OSP311
Title From N to Z: Authentication and Authorization in Microsoft SPS 2010 
Session http://www.msteched.com/2010/NorthAmerica/OSP311
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP311.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP311.wmv
   
Code OSP312
Title Help! My Users Are Everywhere: Designing (Developing) for a Global SharePoint Audience 
Session http://www.msteched.com/2010/NorthAmerica/OSP312
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP312.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP312.wmv
   
Code OSP313
Title Microsoft Office 2010: Developing the Next Wave of Productivity Solutions
Session http://www.msteched.com/2010/NorthAmerica/OSP313
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP313.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP313.wmv
   
Code OSP314
Title Microsoft Outlook and Exchange 2010: Better Together Overview
Session http://www.msteched.com/2010/NorthAmerica/OSP314
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP314.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP314.wmv
   
Code OSP315
Title Microsoft SPS 2010 As a Social Computing Platform 
Session http://www.msteched.com/2010/NorthAmerica/OSP315
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP315.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP315.wmv
   
Code OSP316
Title Microsoft SPS 2010 for the Microsoft ASP.NET Developer
Session http://www.msteched.com/2010/NorthAmerica/OSP316
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP316.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP316.wmv
   
Code OSP317
Title Outlook Social Connector: Deployment and Development Overview
Session http://www.msteched.com/2010/NorthAmerica/OSP317
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP317.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP317.wmv
   
Code OSP318
Title SharePoint is Down: Solutions for High Availability and Disaster Recovery
Session http://www.msteched.com/2010/NorthAmerica/OSP318
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP318.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP318.wmv
   
Code OSP319
Title Upgrading and Improving MOSS WCM Sites to SOS 2010 Web Content Management
Session http://www.msteched.com/2010/NorthAmerica/OSP319
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP319.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP319.wmv
   
Code OSP320
Title Workflow Development in Microsoft SPS 2010 with Microsoft Visual Studio 2010
Session http://www.msteched.com/2010/NorthAmerica/OSP320
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP320.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP320.wmv
   
Code OSP321
Title Microsoft IT: How MSIT Upgraded Microsoft to SharePoint 2010
Session http://www.msteched.com/2010/NorthAmerica/OSP321
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP321.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP321.wmv
   
Code OSP401
Title Upgrading Microsoft Office SharePoint Server 2007 to SPS 2010
Session http://www.msteched.com/2010/NorthAmerica/OSP401
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP401.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP401.wmv
   
Code OSP402
Title Windows PowerShell Made Less Scary for the Microsoft SPS 2010 Administrator
Session http://www.msteched.com/2010/NorthAmerica/OSP402
Presentation http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/pptx/OSP402.pptx
Video http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/wmv/OSP402.wmv

Thanks,
Chandrasekaran C N

Posted in SharePoint, SharePoint 2010 | Tagged: , | Leave a Comment »