Console 3 for Salesforce

Jump to video demo

Review

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.

Query Creation

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.

Console Viewing

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.

Technologies

This solution uses apex and visualforce for the admin pages and front end page.  The field browser dialog uses apex describe information for listing the objects and fields in the system.  The front end page uses javascript remoting for loading the tabs and tables dynamically.

Video Demo 


Advertisements

Salesforce Product Packages

Below is our current solution for how we create product packages and use them in opportunities.  I hope to do other posts like this that give examples of solutions without going into code.  We may build some of these solutions into AppExchange apps one day.

Creating Packages

We first create products in Salesforce that will act as the parent products for packages.  They are the products that users can search for and add to an opportunity like normal.  Using some custom objects and a visualforce page, we provide a way for other products to be related as child products to the parent product.  Children have options like initial quantity, max quantity, min quantity, locked quantity, and is it deletable.  All child prices are rolled up to the package level to form the initial package cost.  A discount can be applied to the package to bring the cost of the package down.  As the package price is changed, the pricebook entry record for the package product changes too so that as users are browsing packages they will see the correct cost.  If the price of a child product is ever changed, then an apex job will detect the change and update packages that used that product.

Using Packages in Opportunities

When package products are added to opportunities, we have triggers that identify the products as package products and copy the package children into the opportunity.  We have overriden the Opportunity page with a visualforce page that displays the user’s normal page layout, but replaces the standard product list with a custom list that highlights the relationship of the child products to the parent products.  Users can discount the package in the opportunity if they want to offer clients discounts or they can delete products that are marked as deletable.  Multiple packages can be added to an opportunity and, if the parent product is deleted, then the entire package is deleted.

Force.com Enhanced Formula Editor Extension

This Google Chrome extension dynamically injects the Edit Area code editor into salesforce pages where formulas are edited.  Install the extension and when you visit a formula edit page it will automatically enhance the textarea.

Chrome Web Store Link

2015 Update!

This extension has started to receive updates and is listed in the chrome store again.  Have an issue or a great idea for this extension? Visit the github project URL below and create an Issue or contribute to it.

https://github.com/kpeterson85/Salesforce-Enhanced-Formula-Editor-Chrome-Extension

Features

  • Syntax highlighting
  • Tabbing (tab and shift-tab)
  • Parenthesis matching
  • Find and Replace
  • No code wrapping
  • Resize editor window by clicking bottom right corner
  • Full screen feature

Downsides

  • No downsides!


Force.com Workflow Search Tool

The Force.com Workflow Search Tool makes it easy to find workflows where field names or values have been used in the criteria or the field updates.  Currently there is no easy way to search for workflows like this which can make it difficult to carefully make changes to fields or field values.  The only way I have been able to get this kind of information before is to include the workflows in my Force.com IDE project and then do a find in files search.  The benefit of this tool is that the results are displayed in a hierarchical fashion and the matching pieces are highlighted for you.

Requirements

  • .NET 4.0
  • User must belong to a profile with the “API Enabled” and “Modify All Data” permissions.

How It Works

  • Logs in using the Partner WSDL
  • Downloads all of the workflow rules from the org using the Meta Data API
  • Loads the XML for the selected object and checks the different pieces of the workflow for the search text.  It returns only the workflows that had a match somewhere.

Download

Screenshots

GroupRows Plugin for jQuery

Demo

Click here to view the demo

How To Use

Download

$("table").groupRows({
  groupColumn: iColumnIndex
});

Options

Option Type Default
groupColumn Integer 0
ignoreFirstRow Boolean True
columnsForGroupRow Integer Array []

Methods

Name Example Purpose
destroy $.groupRows.destroy(table); Remove the current groupings from the table.

Description

This plugin will group the rows of a table together based on a column you specify.  It goes from the top of the table to the bottom and starts a new group whenever it finds new content in the column you specified.

It is useful for making large tables easier for users to scan and understand.  The demo is an example of a long table of steps to perform for certain processes.  Users can group by roles or products to make the table easier to understand.  You could also use additional javascript to auto expand groups based on the statuses of the records in the group.

The “columnsForGroupRow” can be used to display the content of columns from the first record in a group on the group row itself.  An example is showing the subject from every group’s first record on the group rows themselves so users can even more quickly gain an understand of groups.