Skip to content

Saved views

A saved view is a name and a set of list filters. Filter a list the way you work it ("my urgent tickets", "hot leads in Pune"), save it, and put it back later with one tap. From django-crm 1.11.0 six lists take one: leads, contacts, accounts, deals, tickets and invoices, the same six that export to CSV.

Using them

  • Web app: the Saved views menu in the filter bar of each of those lists. Filter the list, then save the current filters under a name. Opening a view puts its filters in the address bar like any other filter, so the back button undoes it. Rename and delete are in the same menu.
  • Phone app: Saved views in the app bar of the same six lists. Tap a view to apply it, use its menu to rename or delete it, or Save current filters.

Both clients use the same API, so a view saved on your laptop opens on your phone. Each client saves only the filters its own screen can show and set. When a view holds a filter the screen has no control for, it still opens, and the menu tells you how many filters it left out rather than narrowing the list by something you cannot see.

Rules

  • Views are private. A view belongs to the person who saved it. Nobody else sees it, admins included. There is no way to share one with a colleague.
  • Up to 25 views per list, per person. Renaming a view or changing its filters still works at the cap.
  • Names are unique per list, ignoring case, and at most 100 characters. The same name can be used on another list.
  • A view only holds filters its list understands. Paging, unknown parameters and malformed values (an id that is not an id, a day that does not exist) are refused when you save, so a view cannot break the list every time it is opened. Custom-field filters are accepted on all six lists.
  • A view never widens what you can see. Applying one sends its filters to the list, and the list applies its usual visibility rule, so a view cannot show a record the list would not show you.

API

GET    /api/saved-views/?module=leads
POST   /api/saved-views/
GET    /api/saved-views/<id>/
PATCH  /api/saved-views/<id>/
DELETE /api/saved-views/<id>/

module is leads, contacts, accounts, opportunities (deals), cases (tickets) or invoices, and cannot change once the view exists. filters maps each of the list's query parameters to a list of values, so a view is applied by sending them to the list as a query string, and the same query string to the list's export/ path downloads it. Another person's view answers 404, the same as an id that does not exist. A personal access token needs the saved-views:read scope to list and open views and saved-views:write to save, rename and delete them.

The full reference, with each list's accepted parameters and the error bodies, is Saved views in the CRM docs.

See also