List View for a Doctype

Dear all,
Sorry to ask a question that has already been asked in different ways, but I can’t make it work…
I have created an app and then a doctype in that app with some records for that doctype.

My doctype is called “Estate”. When I click on it, I have a list of all the “Estate” records. Now I want to customised that list.
I thought I had to create a file in the Estate folder called “Estate_list.js” with the following code:

frappe.listview_settings[‘Estate’] = {
add_fields: [“land_name”, “type_of_land”, “size”, “parent_land”]
};

But nothing is changing on the list view, it is exactly the same as before.

What am I missing?

Thanks for your help (and sorry again if this has been asked multiple times before)

François

Anyone on this?
Thanks

@Francois_Ifitwala i am not quite sure what are you trying to customize. I mean what do you want the list view to show.
Regardless please checkout the code at https://github.com/frappe/erpnext/blob/develop/erpnext/manufacturing/doctype/production_order/production_order_list.js
It might help you.

@Francois_Ifitwala just stumbeled upon this in a different search… Maybe I am missing your point but if you want to change the columns of the list view, simply open your DocType and mark the fields you want to see as “In List View”… I believe it can only show up to 4 columns (additional ones will be surpressed)…

1 Like

The link is broken

The link doesn’t work because this thread is ancient. The docs have a more recent take on the list API:
https://frappeframework.com/docs/v13/user/en/api/list