Category: Sales Cloud

Open Opportunities/Cases list view in Flow

I had a challenge today at work. I needed to display a list of Open Opportunities and Open Cases for any given Account. The aim was to give an account manager a quick view of what Opportunities and Cases were currently in progress for the Account before they touched base with their key contact.

At first, I thought I could just use a related list, but I only wanted the open opportunities and cases, not the whole lot. I also wanted to only show five (5) records of each so it did not take up too much space on the page. There was no way I could find to filter the related list view and only show a maximum of five records.

I’m not a developer, I think I am allergic to Apex but I’m pretty confident with my Salesforce flow skills. So I started thinking, I could do a get records and only get the open opportunities/cases that are related to this Account. The next problem was how to display them in a compact format and finally how to display a maximum of five records?

That’s where UnofficialSF.com comes to the rescue and Eric Smith’s datatable flow component. This allows me to display the records in a table format and also limit the dislay to the first five records.

Here is the full description of the flow for the Opportunity related list, the case flow is almost identical but uses the case object.

First step is to create a new variable: recordId, of type text with Available for Input checked (so we can pass the account ID into the flow from the account page).

Create a New Variable

Get the Open Opportunities related to the Account (recordId)

Add an Assignment Element to Count how many opportunities were returned

Install the datatable component

Before you can use the datatable component you need to install it (and it’s two dependencies from UnofficialSF.com)

Start the install here: https://unofficialsf.com/datatable-lightning-web-component-for-flow-screens-2/

Next, add a screen element and insert the datatable component

Note: Turn off the header/footer as they are not needed,


Configuring the datatable component:

Follow the settings here, you can experiment with changing them later.


Continue with the settings further down the page:


Return to the middle of the page and click the button Configure Columns:


Select the columns you want:

Change the width settings, keeping the total width to 552 (to fit a 1/3 page right column).


Save and activate the flow.


Edit the Lightning Record Page for the Account

Add a Flow component(1).

Select the new Open Opportunities flow (2), select single column (3).

Pass across the {!Record.Id} from the Account page into the flow (4).

Add a Component Visibility filter to only show the component if there are open Opportunities to display (5).

Save and activate the Lightning Page.

Open an Account record that has Open Opportunities to display the result.


Celebrate!

If you want Open cases as well, create a second flow with most of the same settings but select the case object and case fields.

Lightning Messaging Utility

The Lightning Messaging Utility is a great little tool from Salesforce Labs (Free) that admins and developers can use to highlight important information to your users.


Perhaps you have been using a rich text component to display a message on your lightning record pages – this is way better!

Using Component Visibility with this component means you can display a message when a pre-set condition is met and these messages will catch the user’s attention.

Once installed, you can simply drag and drop the message into your lightning record page and configure the settings to suit your requirement. The placement, text, background color, and icon are all configurable.

This message below is based on the total customer spend (total of won opportunities) being over a set value, earning them VIP status. The message is only displayed when this condition is met, using Component Visibility.

This next message is a more general one reminding users of a new feature on this object:

Configuration:

For the VIP Message (example above), the configuration was as follows:

  1. Message type was alert. (Options are alert, inline, prompt, illustration)

2. Show Message – yes we want to show it.

3. Message body – the text of the message

4. Message variant was error (options are info, warning, error or offline) This sets the background color of the message.

5. Show icon – yes we want that displayed.

6. Icon name we used utility:moneybag – get the full list of icons from the Lightning Design System reference here: https://www.lightningdesignsystem.com/icons/ use the icon group name as the prefix. (utility, doctype, standard, custom, action)

7. Icon size – medium (options are medium, xx-small, x-small, small)

8. Icon Variant – inverse (options are inverse, error, success, warning) note: these only apply to the utility icons.

The final part of the configuration is the Component Visibility, we only want this message to display when the Rating field value for this account record = Hot.

Get it here:

You can get the app from here:
https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3u00000MBecDEAT

and the Setup Guide from here:
https://partners.salesforce.com/servlet/servlet.FileDownload?file=00P3A00000nKwoiUAC

and the Lightning Design System Messaging Guidelines here: https://www.lightningdesignsystem.com/guidelines/messaging/overview/#site-main-content

Get more great training resources with our online training material providing everything you need to get certified:

  • Salesforce Administrator
  • Salesforce Platform App Builder
  • Salesforce Advanced Administrator
  • Salesforce Sales Cloud Consultant

Visit our online training site at CertifyCRM.com

Salesforce Dynamic Forms

Dynamic Forms – the ability to dynamically display fields on a lightning page when you want them is one of the most requested Salesforce features of all time with over 98,000 points on the Salesforce Idea Exchange. The original idea for this feature was posted over 13 years ago – so it’s long overdue.

First demonstrated at Dreamforce 2018, the feature will be available for custom objects in Summer ’20. More info here …

New: Sales Cloud Consultant Course

This hands-on course (http://bit.ly/sfccloud) takes you through the steps a consultant would cover to deliver a new Sales Cloud implementation for a client. We identify the business requirements and pain-points and chapter by chapter we set out how to solve them by implementing features of Sales Cloud. Covering all the curriculum for the Salesforce Certified Sales Cloud Consultant, completing this course will not only prepare you for the official exam, it will give you an implementation blueprint for future Sales Cloud implementations.