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

read only attributes in product cockpit for admingroup

former_member656719
Discoverer
0 Likes
521

Hi,

I have to make certain attribute as non editable in productcockpit. User right option will not resolve the issue as they are non-editable by admingroup also.

View Entire Topic
arvind-kumar_avinash
Active Contributor
0 Likes

You can add the following custom property for these attributes:

 <custom-properties>
     <property name="readOnlyForUI">
         <value>Boolean.TRUE</value>
     </property>
 </custom-properties>

Please check core-items.xml for some examples.

Alternatively, you can import the following ImpEx:

 INSERT_UPDATE AttributeDescriptor;qualifier[unique=true];enclosingType(code)[unique=true];readOnlyForUI 
 ;the-attribute-qualifier;the-itemtype;TRUE

Note: Change the-attribute-qualifier and the-itemtype with your attribute and itemtype.

For example, the following ImpEx will make the attribute, name (displayed with the label, Identifier) readOnly (non-editable) for all users, including admin:

 INSERT_UPDATE AttributeDescriptor;qualifier[unique=true];enclosingType(code)[unique=true];readOnlyForUI 
 ;name;Product;TRUE