Quick Tips for improving your Salesforce Experience – Part 8

Here at makepositive we are extremely lucky to work on a huge variety of projects across multiple sectors. With this variety, it means our consultants are exposed to a wide plethora of Salesforce functionality across multiple Clouds.

Our Consultants continue to innovate to deliver solutions that will help our clients, this week we will look at Record Variables, Hyperlink Fields and Triggering a lead assignment rule within a flow.

Record Variable

Alex Larwill introduces us to the wonderful world of flow best practice in terms of flow efficiency.

Did you know that with screen flows, when you are simply updating a record from information gathered from the screens, there’s no need to use a get element to retrieve the record’s field values? Instead, when editing the Lightning Record Page to add the screen flow, an option appears to pass the record ID into a variable in the flow.

Record Variable 1

As long as this checkbox is checked, all that is required is to create a variable with the Record data type (rather than text) which is available for input in the Flow Builder. By doing this, all fields from the record are available to the flow without the need for a get element. This prevents any unnecessary code from redundant flow elements being executed, increasing the speed of a flow’s execution.

new resource

Similarly, with record triggered flows, there is no need to use a get element to fetch the record’s values that triggered the flow as the global $Record variable is already provided (along with $Record__Prior which represents the value of the fields prior to the record change).

Record Variable 3

Hyperlink Fields

Our Consultant Fiona Muchison gave us a tip on how to  Sort Hyperlink Fields in List Views

This may be a niche item but it is something that I have come across in a few orgs, especially when dealing with managed packages or SF partner objects that are set up with auto-numbers rather than names. You might want to create a hyperlink field that displays a more useful name but still links through to the relevant record.

The one downside to this is that users may encounter odd behaviour when attempting to use the custom hyperlink field in a list view and they want to sort alphabetically. As you can see in the provided screenshots, the standard field does not sort the items alphabetically but the second (on the right) does.

The difference in formulas is as below:

  • Standard: HYPERLINK( Robot_Setup__r.Opportunity__r.Id , Robot_Setup__r.Opportunity__r.Name , “_self” )
  • Sortable: HYPERLINK(“/?sort=” & Robot_Setup__r.Opportunity__r.Name , “”, “_self”)& HYPERLINK( Robot_Setup__r.Opportunity__r.Id , Robot_Setup__r.Opportunity__r.Name , “_self” )

In the second option there is an additional instruction with regards to what data should be used by the system for sorting (“/?sort=“). This then allows better navigation as the column works in the same way as others and so avoids user frustration.

Hyperlink Field Sorting

Triggering a lead assignment rule within a flow

Solution Architect, Greg Burke gives us a solution on how to configure the Lead assignment rule with a flow.

I recently came across the requirement to use lead assignment rules for leads generated via an SFI process, but as they are not coming through a standard Salesforce process, the assignment was not firing for those records.

I did a bit of searching around online and came up with a piece of code which would trigger the lead assignment process, but then when inserting it into my auto launch flow I saw that Salesforce have enabled this as an invokable action inside the flow builder.

new action

In order to set this flow up, I had to mark it as an after save record triggered flow with a time delay on the invokable action as per the screenshot, setting the action to run 0 minutes after the Lead was created. Once your scheduled path is created, you add in an action node, give it a name and set the Lead.id to {$Record.Id}

In this scenario, when a lead is created, and the lead source is set to Website, then as the record saves, the process runs the default Lead assignment rule.

configure paths

select object

We hope these tips have helped you explore more functionality within Salesforce. Please feel free to share any of your own top tips in the comments as makepositive strives to build a stronger Salesforce community.

Stay tuned for more of the team’s top tips! If you would like to speak to one of makepositive’s Salesforce experts about how you can improve your Salesforce experience please reach out to us at info@makepositive.com or complete the Contact Form below.

More from the Quick Tips series:
Blog 1 in the Quick Tips for improving your Salesforce Experience Blog Series
Blog 2 in the Quick Tips for improving your Salesforce Experience Blog Series
Blog 3 in the Quick Tips for improving your Salesforce Experience Blog Series
Blog 4 in the Quick Tips for improving your Salesforce Experience Blog Series
Blog 5 in the Quick Tips for improving your Salesforce Experience Blog Series
Blog 6 in the Quick Tips for improving your Salesforce Experience Blog Series
Blog 7 in the Quick Tips for improving your Salesforce Experience Blog Series

Share this post: