on 2018 Aug 29 2:46 PM
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
Request clarification before answering.
I believe this would be the full implementation...
import de.hybris.platform.core.model.enumeration.EnumerationValueModel
import de.hybris.platform.enumeration.impl.DefaultEnumerationService
import de.hybris.platform.jalo.Item
import de.hybris.platform.jalo.JaloSession
import de.hybris.platform.jalo.enumeration.EnumerationValue
import de.hybris.platform.persistence.enumeration.EnumerationValueEJBImpl
import de.hybris.platform.servicelayer.model.ModelService
import de.hybris.platform.servicelayer.type.TypeService
final ModelService modelService = spring.getBean('modelService')
final TypeService typeService = spring.getBean('typeService')
final DefaultEnumerationService enumerationService = spring.getBean('enumerationService')
final EnumerationValueModel enumerationValueModel = typeService.getEnumerationValue(enumerationService.getEnumerationValue("LeadStatus", "NEGOTIATION_REVIEW"));
final Item item = (EnumerationValue) modelService.getSource(enumerationValueModel);
((EnumerationValueEJBImpl) item.getImplementation()).remove(JaloSession.getCurrentSession().getSessionContext());
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.