Request a Quote

Create Custom Local Property in Sharepoint Terms

Create Custom Local Property in Sharepoint Terms

In my project there is a requirement to manage Terms with Custom Local property. For that there is a simple way to create or update custom local property in term. We can use this code at the time of Term create or update. Here is Code to create custom local property for particular term set.

///<summary>
/// Creates the custom local properties of a Term
///</summary>
private void CreateCustomLocalProperties(Term term)
{
    SPSecurity.RunWithElevatedPrivileges(delegate()
    {
        term.SetLocalCustomProperty("Property1", "Value1");
        term.SetLocalCustomProperty("Property2", "Value2");
        term.SetLocalCustomProperty("Property3", "Value3");
    });
}

We can see our custom local property inside Central Admin > Manage service applications > Managed Metadata Service > select your term inside Term set:

2015-02-27_1148

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © 2015 Trimantra Software Solution LLP- Software Outsourcing Company India. All rights reserved.