11.3. Managing Document Creation

In any document management solution, it's important that each new document adhere to organizational standards. This is especially true when metadata is being used to drive business processes. Even with a well-defined set of metadata fields and established guidelines for filling them out, busy knowledge workers often forget to provide this information because they are too focused on the document content. If the metadata is incomplete or inconsistent, then automated business processes that depend on it will fail. This leads to inefficiency and additional costs associated with finding and correcting the missing data.

Windows SharePoint Services 3.0 provides an enhanced callback mechanism that enables solution developers to control the document creation process and take prescriptive action based on the current state of the document. By implementing event receivers, you can write custom code that is called during document creation.

Document creation occurs in three stages:

  1. The document template is opened in the appropriate editor program. The user edits the content and metadata and then saves the document into the library,

  2. SharePoint retrieves the metadata and places it in a property bag, which it passes to the ItemAdding event receivers that have been registered for the library.

  3. Unless one of the ItemAdding receivers cancels the document as noted below, SharePoint uses the properties to construct a new document list item, which is then added to the library. ...

Get Professional SharePoint® 2007 Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.