List View Settings

Hello guys

I added a new option in the status, “Hold”.

I want to change the color of hold in the list view.
Is there any option to view the complete row in different colors based on the status?

Please help me with this.

I added a code in the client script, but that not working, and the lead list is not displayed while enabling my code :pensive:

This is my code

frappe.listview_settings['Lead'] = {
    add_fields: ["company_name", "lead_name", "status"],
    get_indicator: function(doc) {
            var indicator = [__(doc.status), frappe.utils.guess_colour(doc.status), "status,=," + doc.status];
            if(doc.status=="Hold") {
                    indicator[1] = "green";
            }
            return indicator;
    },

please help me.

Hi @jinsy;

Please add one more closing brackets };

frappe.listview_settings['Lead'] = {
    add_fields: ["company_name", "lead_name", "status"],
    get_indicator: function(doc) {
            var indicator = [__(doc.status), frappe.utils.guess_colour(doc.status), "status,=," + doc.status];
            if(doc.status=="Hold") {
                    indicator[1] = "green";
            }
            return indicator;
    },
};

Please set status according to.
Please apply, reload and check it

Thanks.

1 Like

Thanks . That works

@NCP Is there any option to see the whole row in different colors based on status?

I don’t have an idea about it.

Thanks.

Ok Thanks