Wednesday, May 5, 2010

SharePoint Making the Title as required field in Document/Picture library

Scenario:
Document Library has Name as the required field, whereas Title is not. Now making the Title field as required in a Document/Picture Library.

Solution:
Navigate to the Document/Picture Library Settings and enable it by managing content type.

Steps:
1. Go to Document/Picture Library Settings
2. Click on Advanced Settings
3. Select 'Yes' for the option 'Do you want to manage the content types?' and Save
4. Click on 'Document' link under Content Types section
5. You will see all the columns listed
6. Click on 'Title' and now you can make it required field.
7. Save the changes
(OR)
Solution:
By default, the title field doesn’t contain any validation in Document/Picture Library. If it needs to be made as required one, schema.xml of “Document/Picture Library” needs to be customized, which can be found at the following location.
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\Document or Picture Library\DocLib or PicLib
Steps
1. Open the schema.xml from the above location
2. Locate the “Title” field and add the attribute - Required="TRUE" to the tag.

Required="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title">
3. Install and activate the feature. Now title field asks for value as it is required.

No comments:

Post a Comment