cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Unable to delete enum value from dynamic type

bhavirisetty
Active Participant
0 Kudos
1,995

Hello Experts,

I've tried to delete enum value for one of dynamic type from HMC/Impex/Code, I am getting following error,

If I create some value through hmc, I am able to delete them, but not the ones defined in items.xml file, When I try to debug I understand in DB editable column having null for EnumerationValues table, I am not sure why dynamic enums are holding null. If I change editable to true from DB directly, I am able to delete item.

Is there any proper way to delete it? Through code or HMC or Impex?

Note : I am using Hybris 5.7 version.

Thanks

View Entire Topic
bhavirisetty
Active Participant
0 Kudos

Hi ,

Thanks for quick response, I am able to figure out alternative solution,

 final EnumerationValueModel enumerationValueModel = typeService.getEnumerationValue(enumerationService.getEnumerationValue("LeadStatus", "NEGOTIATION_REVIEW"));
 final Item item = (EnumerationValue) getModelService().getSource(enumerationValueModel);
 ((EnumerationValueEJBImpl) item.getImplementation()).remove(JaloSession.getCurrentSession().getSessionContext());

Using jalo layer code is not an recommended approach, However it's an one time data correction activity post deployment.

Thanks, Phani