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

How to remove an inherited attribute in editview in hmc

rukmini1
Explorer
0 Likes
1,146

I have "UNFSIze2VariantProduct"-Type-which extends UNFStylevariantproduct . UNFStylevariantproduct have an attribute 'swatchColour'. I want to remove swatchColour in UNFSIze2VariantProduct in hmc. I tried replace and delete,but didnot work. Can you please help?

Accepted Solutions (0)

Answers (1)

Answers (1)

arvind-kumar_avinash
Active Contributor
0 Likes

You can add the following custom property for this attribute:

 <custom-properties>
     <property name="hiddenForUI">
         <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];hiddenForUI 
 ;swatchColour;UNFStylevariantproduct;TRUE

If this doesn't work, rewrite/redefine the item in your extension's hmc.xml excluding the section which has swatchColor i.e. copy the complete tree of <type name="... and paste it in your extension's hmc.xml and remove the section which has swatchColor from this. Finally, execute ant clean all updatesystem and restart the server.

arvind-kumar_avinash
Active Contributor
0 Likes

Hi - I hope the solution has worked for you. Please let me know if you have any doubt regarding this solution.

rukmini1
Explorer
0 Likes

Hi Arvind, Thanks for inputs. When I ran ImpEx, do I need to clear any cache? Because I still see the attribute.

arvind-kumar_avinash
Active Contributor
0 Likes

Hi Rukmini - did the ImpEx get executed successfully? I am asking because swatchColour and UNFSIze2VariantProduct are custom items. After executing the ImpEx, you just need to exit hMC and login again. Clearing cache should not be required.

rukmini1
Explorer
0 Likes

I enabled Hidden for UI checkbox. I want to remove swatchcolour from UNFSize2variantproduct in editview of hmc.xml please find attachment.

arvind-kumar_avinash
Active Contributor
0 Likes

I didn't understand whether your problem is solved or you are still having the issue.

rukmini1
Explorer
0 Likes

Impex executed successfully. I exited and I even opened in Incognito window. My main idea is to remove swatchcolour column in edit view in hmc

rukmini1
Explorer
0 Likes

I ran the following impex INSERT_UPDATE VariantAttributeDescriptor;qualifier[unique=true];enclosingType(code)[unique=true];hiddenForUI ;swatchColour;UNFSize2VariantProduct;TRUE

arvind-kumar_avinash
Active Contributor
0 Likes

Hi Rukmini - could you please replace UNFSize2VariantProduct with UNFStylevariantproduct in the ImpEx and import again?

  INSERT_UPDATE AttributeDescriptor;qualifier[unique=true];enclosingType(code)[unique=true];hiddenForUI 
  ;swatchColour;UNFStylevariantproduct;TRUE

Note: I have also updated it my original answer.

rukmini1
Explorer
0 Likes

Hi Arvind, I ran the above impex succesfully.

In hmc.xml

   <organizer>
      <result mode="append">        
         <editview>
            <itemlayout>
               <attribute name="swatchColour" width="150" mode="delete"/>              
            </itemlayout>
         </editview>
      </result>
    </organizer>
 </type>


It did not remove swatchcolour

rukmini1
Explorer
0 Likes

In hmc-editview i dont want swatchcolour

rukmini1
Explorer
0 Likes

Can you please help me out in removing the swatchColor from editview?

arvind-kumar_avinash
Active Contributor
0 Likes

I have updated my answer. Please try the last section in my answer and let me know if it works.

rukmini1
Explorer
0 Likes

sorry I didnot get you

rukmini1
Explorer
0 Likes

Redefining type in hmc.xml like

   <organizer>
      <result mode="append">        
         <editview>
            <itemlayout>
               <attribute name="size2DescCode" width="150"/>              
            </itemlayout>
         </editview>
      </result>
    </organizer>
   

did ant clean all and update sysytem.

Still did not work I am missing something?