[HOW TO] Disable ListView of a doctype?

Hi guys,

I am wondering how to disable listview for particular doctypes (let say B,C,D).
They are added dynamically from other doctype (let say A) and should be accessed only from this instance?
If it is not possible easy way please point me so that I can implement it.

Brgrds,
Marcin

Check the “User cannot search” property of the DocType (from the UI)

@rmehta Unfortunately he cannot search but still can access the list.

  1. I want this document to vanish from Documents (module) list.

  2. This shouldn’t work as well:
    http://my_erp_address/desk#List/Doctype%20Only_possible_to_visit_by_link

I should only be able to go to particular instance like:
http://my_erp_address/desk#Form/Only_possible_to_visit_by_link/2016-01-01Doctype_ID

Probably I have to block some particular doctypes in module documents listing and block listviews :slight_smile:

Hi,
The topic is old, but if someone need this.

I have a trick to avoid seeing the ListView of a particular DocType.
To do that you can override the before_render trigger with frappe.set_route() like the example below:

frappe.listview_settings['Your Doc'] = {
    before_render() {
        // triggers before every render of list records
        frappe.set_route() // redirect to home
    },
}
1 Like