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

read only attributes in product cockpit for admingroup

former_member656719
Discoverer
0 Kudos
472

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

arvind-kumar_avinash
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi

There is an option in backoffice ,go to that type edit that attribute go to section "Read only for UI" change this value with true ,it works thanks, prabhakar