Can’t view doc’s custom status field of a submittable doc

Hello Everyone …I’ve a custom doctype which is submittable and i’ve added a field named status.Now the list view of doctype shows frappe’s docstatus and unable to see my field even after adding to listview.Does anyone know how to solve this problem??

I can’t rename fielname as it is used in many other places and reports.I would be very grateful if anyone could provide a solution .Thank you!

This is expected behavior in Frappe Framework.

When a DocType is submittable, the system always prioritizes docstatus in List View, so your custom status field may not show even if added.

Force it using ListView script:

frappe.listview_settings['Your Doctype'] = {
    add_fields: ["status"]
};

Use get_indicator to display your status as a colored label instead of a column:

get_indicator: function(doc) {
    return [doc.status, "blue", "status,=," + doc.status];
}

Don’t replace docstatus, just display your status smartly.

1 Like

Thank you.It’s resolved​:raising_hands:t2:

1 Like