Monday, September 19, 2011

Utilize the Managed Metadata Service application tip #1 - How to resolve "The required feature is not enabled for this column type" error


The Managed Metadata Service application is one of the most important and interesting new service applications in SharePoint Server 2010.  It’s responsible for enabling the centralized management of terms (also called metadata or tags) and deployment of content types across site collections, web applications, and even farms.  Terms and content types are the backbone of information architecture (IA) for the governance, tagging, and searching.

However there are many tricks if you plan to fully utilize this service application. I’m going to list some of those here in hopes that they would help the broader community. The first tip is how to resolve "The required feature is not enabled for this column type" error.


Issue #1: You may get "The required feature is not enabled for this column type" error if you are using the new Term Store and trying the create a column of type "Managed Metadata" in a site as in the below screen shot.


Root cause: The site your are using is created by "Blank Site" template with hidden "TaxonomyFieldAdded" feature required to add a managed metadata column is not activated by default as described in previous blog.

Solution: Manually enable the feature using the "TaxonomyFieldAdded" feature and you will see the difference after you execute the following command.

Enable-SPFeature -id 73EF14B1-13A9-416b-A9B5-ECECA2B0604C -url  http://sbx01/sites/blank

 
Automate the process for new sites: You could add the feature sampling feature to your farm so "TaxonomyFieldAdded" feature will be added to any site created from "Blank Site" template. Here is the code you should add to the feature sampling.

<FeatureSiteTemplateAssociation TemplateName="STD#1" Id="73EF14B1-13A9-416b-A9B5-ECECA2B0604C"/>

You could find the "Blank Site" template ID’s listed in above command in SharePoint using the following PowerShell.

Get-SPFeature -Site http://sbx01/sites/blank | Sort DisplayName | FT DisplayName,Id

Automated process for existing sites: You may also need to use PowerShell to identify all existing sites craeted from "Blank Sites" template and perfroma a mass update to enabled the feature discussed here. We have also developed a PowerShell cmdl to perform this mass updates that will be shared in different time. You could find some scripts or write your own process to accomplish this.

 

You might be happy since you could use the metadata terms in any of the list column. Before you are open this service to end users, please read the other tips.

 

Utilize the Managed Metadata Service application tip #1 - How to resolve "The required feature is not enabled for this column type" error 

Utilize the Managed Metadata Service application tip #2 - Metadata column not visible for users other than site collection administrators

Utilize the Managed Metadata Service application tip #3 – Impact of message “Earlier versions of client programs might not support this type of column” on Document Library

Utilize the Managed Metadata Service application tip #4 – How to workaround "Deletion of this user as a contributor failed" for local term store 

Utilize the Managed Metadata Service application tip #5 – Be aware of "Deletion of this user as a contributor failed" error on AD groups for local term store

Utilize the Managed Metadata Service application tip #6 – How to fix "The default termstore for this site cannot be identified " error

Utilize the Managed Metadata Service application tip #7 – How to read managed metadata column relationship 

Utilize the Managed Metadata Service application tip #8 - How to resolve error "This operation cannot be completed. The term store may be unavailable."






1 comment:

  1. Hi,i am newbie for shrepoint.
    our aim is to save end user career details and resume in to the list.
    we saved the career details. but we cannot able to attach the reusme to the custom list attachment.
    we generated entity class for custom list.
    we have manager class and business validation class.
    from user control we pass the EntityClass Item and its value to validation class.
    from there it calls busniess layer to save the details in to column.
    where as for resume we cannot attach the documents to list attachment.
    please help me. sathishkumar@fohmics.com
    from the entity class i don't see any column value for attachment.
    from user control on click event for save.
    -------------------------------------------------
    public bool SaveApplications()
    {
    FertilApplicantsValidation = new FertilApplicantsValidation();
    FertilVacancyApplicationsItem item = new FertilVacancyApplicationsItem();
    item.ApplicantName = txtName.Text.ToString().Trim();
    item.ApplicantEmail = txtEmail.Text.ToString().Trim();
    item.ApplicantContactNumber = txtContact.Text.ToString().Trim();
    item.ApplicationDate = DateTime.Now;
    item.VaccantidId.Add(int.Parse(VaccantID));
    FertilApplicantsValidation = new FertilApplicantsValidation();
    return FertilApplicantsValidation.SaveFertilApplicnats(URL, item);
    }



    -----------------------
    from Validation class
    public bool SaveFertilApplicnats(string webUrl, FertilVacancyApplicationsItem item)
    {
    bool isSave = false;
    try {
    using (FertilVacancyManager manager = new FertilVacancyManager(webUrl))
    {
    isSave = manager.saveFertilApplicantsData(item);
    }
    }
    catch (Exception ex)
    {
    Logger.Instance.Error("FertilVacancyValidation_getFertilApplicantsData", ex);
    }
    return isSave;
    }
    From manager class
    public bool saveFertilApplicantsData(FertilVacancyApplicationsItem item) {
    try {
    using (ContextSwitch cSwitch = new ContextSwitch()) {
    m_ApplicantsdataContext = cSwitch.GetFertilApplicantsDataContext(m_webUrl); m_ApplicantsdataContext.FertilVacancyApplications.InsertOnSubmit(item); m_ApplicantsdataContext.SubmitChanges();
    }
    } catch (Exception ex) { Logger.Instance.Error("VacancyManager_getFertilApplicantsData", ex);
    return false; }
    return true; }

    ReplyDelete