How to hide this ID

Hii @tzg19880816

If you want to remove the ID then you have to apply the Listview client script.

frappe.listview_settings['Your_DocType'] = {
    refresh: function(listview) {
       // Hide name filter from Listview
        $("div[data-fieldname = name]").hide();
    },
    // Hide name from Listview
	 hide_name_column: true
};

I hope this is helpful for you.
Thanks.

1 Like

Thank you, I tried your method, but it didn’t work

@tzg19880816 Have a look on this.

https://frappeframework.com/docs/user/en/api/list#custom-list-js

Hi @tzg19880816 @Kiranmai

I think this only works if you set other field as title on your doctype rather than your id(name field)

https://frappeframework.com/docs/v14/user/en/basics/doctypes/form_&_view_settings

Hope this helps.

@avc I dont want that name(id) field in list view.

If we did like this, the title field only changed.

Hi @Kiranmai:

Yes, but random id will be not shown after hide_name_column: true
Maybe you can use as title some other field.

@avc

I tried that one also. Test is my doctype name.

Screenshot from 2024-05-23 10-40-54

Ok, but you need to use both techniques combined. Tried?
Anyway, it only works for list, not for “Form” view. …

Yes, @avc. But still no use.

I use just this (Client Script for list view) and it works fine:

frappe.listview_settings[‘Your DocType’] = {
hide_name_column: true,
};