You can change the item type of an asset to a dynamic subtype of its current item type. For instance, if you have previously created an electricalProduct
dynamic subtype, you can change existing product
items to electricalProduct
items. The following example illustrates this:
<update-item item-descriptor="product" id="prod120021"> <set-property name="type"><![CDATA[electricalProduct]]></set-property> </update-item>
There are key restrictions on changing the item type of an asset:
The original item type can be either a static type or a dynamic subtype, but the new item type must be a dynamic subtype.
The new item type must be a descendant of the original item type in the type hierarchy. It cannot be above the original item type (for example, the parent of the original type) in the type hierarchy, or at the same level as the original type.
Note, also, that you cannot change the item type of an asset and set properties of it in the same project. So, in the example above, after changing the item type to electricalProduct
, you need to create a separate project to set any subtype-specific properties.