Jump to video demo
This is another custom console solution that replaces the other console solution I described in Console 2 for Salesforce. The things we tried to improve upon are:
- We wanted to display the record data in standard html tables instead of the Enhanced List controls. This would be less page heavy, we could have more than 5 tables on a page, and the table heights and column widths would be automatically sized to their records.
- We wanted users to be able to see on one page a set of tables but still know if there were new records in their other tabs.
- We wanted to create the queries used to populate the pages with something other than the listviews feature. It still needed to be something an admin could do without getting into code like the listviews were.
With this new solution there are three main pieces to it.
We created a way for admins to create the different pieces of a SOQL query (columns to display, filter criteria, sorting) much like they did with the listview feature. They select fields for each section using a Field Browser dialog we created where they can browse all the fields and object relationships starting from the base object for the query. They can then sort the fields and enter their filter criteria formulas. Behind the scenes, apex builds the actual SOQL query that is stored and later executed on the console pages. A custom placeholder is available for the filter criteria that identifies a current user id. This is later used for easily previewing queries as other users.
Console Template Creation
After admins define the queries, they create a console template. A console template defines what tabs will be available, what queries will be shown under each tab, and what specific roles and users a template should be shown for. The admin creates the tabs they want to show at the top of the page and then assigns different queries to the tabs. The queries will show as tables displayed one after the other under their tab when the tab is selected. When users view their console page, a template is automatically chosen for them based on the role and user assignments. Roles are selected for more general assignments but specific users can be selected for a template to override a general role assignment elsewhere.
To easily see what other users would see, there is a Preview dropdown that allows admins to preview the console template as any user in the system. This makes it easier to verify that your queries are right and to troubleshoot any issues that users submit later.
For each query, admins can choose to display add links, display edit links, display delete links, and to identify unread records. Identifying unread records is a very helpful feature because it lets users know which records have been created or modified since the last time they marked a table as read.
When a user goes to their console page, a console template is loaded from the system for them. It loads the tabs for the queries and then loads all the queries for the first tab and displays the resulting tables. As users click to a different tab, the page loads the queries and resulting tables for the new tab. The tables and tabs refresh automatically every so often to make sure the latest data is available.
For queries that have the Identify Unread feature turned on for them, unread queries are highlighted and counted for each table. Unread records are also counted for the tabs that are not currently being viewed. This is very helpful in letting users know if there is new information in tabs they are not currently looking at.