我在 Hybris 中的一个项目中有一个列表关系。此列表不需要在 HMC 管理选项卡中显示,并且在查看项目时会导致加载时间较长。
我在尝试使用 hmc.xml 限制显示结果的数量或从 HMC 中删除特定属性芯片时遇到困难。
如有任何建议,我们将不胜感激。
谢谢
<relation code="Favorite2ProductRelation" localized="false"
generate="true" autocreate="true">
<sourceElement type="Favorite" qualifier="favorite"
cardinality="many">
<modifiers read="true" write="true" search="true" />
<custom-properties>
<property name="hiddenForUI">
<value>Boolean.TRUE</value>
</property>
</custom-properties>
</sourceElement>
<targetElement type="Product" qualifier="product"
cardinality="one">
<modifiers read="true" write="true" search="true" initial="true"
optional="false" />
</targetElement>
最佳答案
在属性定义中,您可以设置属性 hiddenForUI
,它将向 bo 隐藏该字段:
<attribute ...>
<custom-properties>
<property name="hiddenForUI">
<value>Boolean.TRUE</value>
</property>
</custom-properties>
</attribute>
但是它似乎不能用于关系...
您可以使用 impex 切换属性值:
INSERT_UPDATE RelationDescriptor;qualifier[unique=true];hiddenForUI[default=true]
;<attributeOfYourRelationToHide>;
如果您的属性名称存在于不同的对象中,您可以使用 enleadingType
指定您正在处理的对象(感谢 Mouad El Fakir 的召回)
INSERT_UPDATE RelationDescriptor;enclosingType(code)[unique=true];qualifier[unique=true];hiddenForUI[default=true]
;<objectHoldingTheAttributeToHide>;<attributeOfYourRelationToHide>;
关于sap-commerce-cloud - 限制 hmc 管理选项卡中的结果数量或删除属性芯片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43042235/