cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete custom ItemType that not appears in items.xml

cat2023
Associate
Associate

We have created some custom types in the past with the "generate" attribute as "false", which are no longer needed and we want to remove them.

We have already carried out the standard process for this, which is:

1 - Remove the code in responsible items.xml files;
2 - Perform the build with ant and perform the Update System

The next step would be to remove this type from the orphans in the HAC, however, these do not appear. I believe it must be because the "generate" attribute of the custom type is "false", because when we create custom objects with the "generate" attribute as "true", it appears.

Therefore, we have some questions:

1 - What is the "generate" attribute actually used for when creating or extending a new type?
2 - What should be our choice, considering that someday this new type may be removed?
3 - And now the main question: how to remove these customized items that do not appear in the orphans in the HAC?

Accepted Solutions (0)

Answers (1)

Answers (1)

cat2023
Associate
Associate

1. Q - What is the "generate" attribute actually used for when creating or extending a new type?

A - generate to true(for item type) results in Java class files being generated for this type (additional details). Setting the generate modifier to false results in no Java class file being generated for this type. Having no Java class file available means that you aren’t able to implement a custom business logic (such as getter and/or setter methods) for the type. You have to use the supertype's business logic implementation. The generated methods for the attributes are written into your extension's manager, but not into the corresponding type class. In essence, this means that you have to address your extension's manager class to set values for these attributes. For more details, you could refer to this help doc: items.xml- Adding Types and Attributes. 2. Q - What should be our choice, considering that someday this new type may be removed? A - Please based on the answer of question 1 and consider set it as true or false. As default, it always set as true.3. Q - And now the main question: how to remove these customized items that do not appear in the orphans in the HAC?A - (1)After remove the item types, you could go to HAC >> Maintenance >> Clean up, to check if there exist any orphans types. (2)You could also go to HAC >> Console >> Flexible Search >> Flexible Query, use the query to check if the type still in the composedtypes data table: select * from {composedtype} where {composedtype.code}='Item' (you could replace the "Item" to your comstom type name).