Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Karlo Medallo 14 posts 36 karma points
    Oct 24, 2013 @ 02:03
    Karlo Medallo
    0

    How to update Content Type Property (e.g Mandatory, Validation, Description) in Umbraco 6.1.X?

    How do I update a Content Type Property (e.g Mandatory, Validation, Description) in Umbraco 6 (I'm using 6.1.6)?

    I tried updating like below but it doesn't update it:

    PropertyType prop = contentType.getPropertyType(propAlias);

    //contentType is umbraco.cms.businesslogic.ContentType

    prop.Mandatory = propAttr.Mandatory;

                    prop.ValidationRegExp = propAttr.ValidationRegExp;

                    prop.Description = propAttr.Description;

                    prop.SortOrder = propertySortOrder;

                    prop.Save();

     

    Am I missing something?

Please Sign in or register to post replies

Write your reply to:

Draft