Question

Changing colors of records

If Account is a VIP, then on the main list display its name in bold and green. Can I do it? because it makes it easier to identify such records.

Like 0

Like

4 comments

hi Arkadiusz Polus,



Yes, it is possible.

Pleasee add the below in the corresponding section schema page.

prepareResponseCollectionItem: function(item) {
          this.callParent(arguments);
          if (item.get("youVipcolum") === true) {
            item.customStyle = Ext.apply({}, {
              "background-color": "#00FF00",
              "font-weight": "bold"
            }, item.customStyle);
          }
       }

Please make sure that column is added to the section main list (display column). It it is not added, please add the below code in the same section schema page.

initQueryColumns: function(esq) {
    this.callParent(arguments);
    if (!esq.columns.contains("yourVIPcolumnname")) {
        esq.addColumn("yourVIPcolumnname");
    }
}





BR,

Bhoobalan Palanivelu.

Thanks for quick reply!

Buy if my account is a VIP (VIP is a checkbox) and where exactly to add those lines of code

Arkadiusz Polus,



Replace the column name of the checkbox in the provided code.

The code should be added in the account section schema.

i create section in application hub so i should add in form page schema or list page?

Show all comments