SAP Hybris: Add existing attribute to Backoffice ListView

Prerequisite
-
Create your custom Backoffice extension, say, ‘mycustombackoffice’
You will have 2 important files in your Backoffice extension 
- mycustombackoffice/resources/ mycustombackoffice-backoffice-config.xml
- mycustombackoffice/resources/ mycustombackoffice-backoffice-widgets.xml

Here we are mainly concerned about mycustombackoffice-backoffice-config.xml file.


  • Let us say that we want to display another attribute in the list view for ‘Product’. You can check platformbackoffice-backoffice-config.xml file for OOTB code.
  • Right now, this is that we see in Backoffice as per the code above

We only have 4 columns displayed in the list view.

  • As we already have another attribute called unit for Product item type, we can add another column with this attribute to the list view.
  • Open mycustombackoffice-backoffice-config.xml, and paste the code below:
  • Build the system, start the server and Reset the config file from application orchestrator mode of Backoffice by pressing F4.
  • You will see that the column will be added

Happy Learning! :)