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 DataTypeId, DataTypeDefinitionId fields are read only.
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:
In v6 api (Umbraco.Core.Models.PropertyType) there is no such field, no methods for setting this up, and DataTypeId, DataTypeDefinitionId fields are read only.
Any idea how to do that in v6 api?
If you are using V6 I recommend that you use the new API.
http://our.umbraco.org/documentation/Reference/Management-v6/
dave
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.
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
is working on a reply...