I created my custom doctype, I added a field with name Status/Select/status options (‘Requested’, ‘Approved’, ‘Cancelled’). But with the title the status are displayed (‘Draft’, ‘Cancelled’, ‘Submitted’) instead of (‘Requested’, ‘Approved’, ‘Cancelled’). I attached the attachement. Please help me to resolve that problem. Thank You!
1 Like
@fahad-bt you have to add custom_doctype_list.js file in the same folder your doctype is , or create a client script type apply to list . and write the following code :
frappe.listview_settings['Custom Doctype'] = {
get_indicator(doc) {
// customize indicator color
if (doc.status=="Approved") {
return [__("Approved"), "green", "status,=,Approved"];
} else {
return [__("else"), "darkgrey", "status,=,else"];
}
},
}
continue with the else for other status.
for more information visit List Js
4 Likes