During SharePoint sessions I often get the question if you could have permissions on the properties of an item in a List or Document Library. This means that some of the properties of an item can be edited or filled in by someone with the right user permissions.
This is not available out-of-the-box and to make something like this you have to create a Custom Field Type. Because I'm a very polite and nice person, I've created such a private field for you and off course I will make it available on my blog, but let me first show you how it works.
Before you can use the private field you need to deploy it to SharePoint. First you will need to download the PrivateFieldPackage by clicking here. Once you've downloaded the package you need to deploy it. I've deployed with following command line statements:
stsadm -o addsolution -filename "C:\PrivateFieldPackage.wsp"
stsadm -o deploysolution -immediate -allowgacdeployment -name PrivateFieldPackage.wsp -allcontenturls
stsadm -o execadmsvcjobs
Once it is deployed you can use it in Lists or Document Libraries.
- Create a List or a Document Library
- Create a column and pick "Private Text field" as the type of the column
- Next we are going to give a user or group the rights on the field.
- Once the field is created we can add items in the list or library, first I'm going to create an item logged in as myself.
- Now I'm going to edit the item logged in as Jan, and you will see that the field is disabled and Jan is not able to fill the item in.
There you go, off course this field is not finished yet, if you have suggestions for the next version of the private fields or you find a little bug, please let me know.
As last I want to thank Jan and Karine for helping me with this field.