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.
Hi,i am newbie for shrepoint.
ReplyDeleteour 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; }