Home » Uncategorized » Removing Enum values in hybris (SAP CX)

Removing Enum values in hybris (SAP CX)

For removing Enum we need to take following Steps:

lets say, we have this Enum and “ON_VALIDATION” needs to be removed :

<enumtype code="OrderStatus" autocreate="true" generate="true">
    <value code="CREATED"/>
    <value code="ON_VALIDATION"/>
    <value code="COMPLETED"/>
    <value code="CANCELLED"/>
</enumtype>

Solution :

Step 1: remove this entry (ON_VALIDATION) from items.xml and update the running system.

Step 2: Run following query in HAC under SQL Query:

Delete FROM enumerationvalues item_t0 WHERE (item_t0.code="ON_VALIDATION")

TIPS :

In some cases if the changes are not displayed in Backoffice or HMC then try Flexi search to see the real effect.

SELECT * FROM {OrderStatus}