jinsy
1
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 
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.
NCP
2
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
jinsy
3
Thanks . That works
@NCP Is there any option to see the whole row in different colors based on status?
NCP
4
I don’t have an idea about it.
Thanks.
where can i put this script on? thanks
NCP
7
Hi @beecool,
Please add it in the client script doctype. check it.
hi, in my custom script the “Apply To” not show, im using v12
NCP
9
v12 has no option. Kindly upgrade to version 14 or 15 because it no longer provides support for version 13 or older.
can that script runing on v12?
im sorry another solution maybe? i can’t update to other version, have to stay on v12