I recently had to build a MOSS solution that included two features - one feature created custom permission sets when activated, and the second feature created custom groups and bound the custom permission sets (created by the first feature) to the custom groups in the second feature.
I wanted to expose the features to the Site Features console so that they could be easily activated/deactivated by the Site Administrator, but I didn't want them activated out of order.
One approach to this problem is using a feature dependency. By specifying the GUID of a dependent feature in a feature.xml file, you can prevent the feature from being activated if the dependent feature has not already been activated.
Additionally, a user-friendly message is displayed to the site administrator specifying the dependent feature that must be activated before MOSS will allow the current feature to be activated.
All in all, feature dependencies are an easy-to-implement feature in MOSS 2007 that keep the deployment of your custom features trouble-free.
Tuesday, September 1, 2009
Subscribe to:
Posts (Atom)