Copied to clipboard

Flag this post as spam?

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


  • Pavel Gurecki 55 posts 158 karma points
    Jun 13, 2013 @ 15:50
    Pavel Gurecki
    0

    Umbraco 6 API - Change property type programmaticaly

    Hey guys,

    I'm trying to update uSitebuilder (https://usitebuilder.codeplex.com/SourceControl/latest) doctype synchronisation to use new v6 API.

    The problem I've bumped into, is that I can't find a way of changing document property type.

    In the old api (umbraco.cms.businesslogic.propertytype) you could do:

    property.DataTypeDefinition = dataTypeDefinition;

    In v6 api  (Umbraco.Core.Models.PropertyType) there is no such field, no methods for setting this up, and DataTypeIdDataTypeDefinitionId fields are read only.

    Any idea how to do that in v6 api? 

     

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jun 14, 2013 @ 10:12
    Dave Woestenborghs
    0

    If you are using V6 I recommend that you use the new API.

     

    http://our.umbraco.org/documentation/Reference/Management-v6/

    dave

  • Pavel Gurecki 55 posts 158 karma points
    Jun 14, 2013 @ 11:53
    Pavel Gurecki
    0

    Actually I am using new API, Umbraco.Core.Models.PropertyType is part of it and my question is how to change property type with new API.

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jun 14, 2013 @ 12:31
    Dave Woestenborghs
    0

    Looking at source of Umbraco.Core.Models.PropertyType it's possible to set the DataTypeDefinitionId,DataTypeId and DataTypeDatabaseType

     

    https://github.com/umbraco/Umbraco-CMS/blob/master/src/Umbraco.Core/Models/PropertyType.cs

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies