Create the Activity Comment Preview in Salesforce
Author: Kris Nowacki

Create the Activity Comment Preview in Salesforce


Prologue aka business context

What is the main feature of any CRM? I would say that's ...writing :D

"Tears are words that need to be written."

-Paulo Coelho

Yes, just writing. Writing notes, comments, descriptions, thoughts, emails, filling up the forms, updating fields. Just writing anything is the most used CRM feature. Simple as it is. Hate it or take it, it's the core.

As this is so important to keep your CRM up to date what would you say if I would tell you that you can write a task note, two, three, dozen of notes and then if you want to check those notes you need to enter every task one by one. That was the Salesforce situation before they present the Activity Timeline feature. Activity Timeline shows the notes directly on the timeline so the user can have quick access to the most important task information.

But what about when you don't want to use the Activity Timeline component and see the tasks on the list. Then Salesforce will not help as the Comment/Description field can not be used on the related list. If you don't know Salesforce imagine a system where after going to the company record to see tasks (calls, emails, etc.) that were performed on this company you need to enter every task to see the notes you or someone else created on the task. Looks like a nightmare? It may be.

No alt text provided for this image
"And isn't it ironic... don't you think"

- Alanis Morissette 

Salesforce is not supporting the Comment/Description as it is a field that stores more than 255 signs. It's the FEATURE. Beat it or leave it!

Let's try to beat it! Mhh ... I have an idea. Maybe we should trim the note to 255 signs to show the beginning of it and at least help users to decide if they should open the task to see the details. You can to it in Salesforce! There is a "Left" Excel-like formula that will be useful here. You can use it while creating formula fields, it is accessible in process builder and flows. Eureka you could say! I will use the formula field to trim full comment and will show it on the tasks list. Not so fast. Salesforce Tasks object is one of its kind and got several limitations dedicated only to it. One of these is that you can not use the task "Description" fields in field formulas. Bummer!

”Nobody is gonna hit as hard as life, but it ain’t how hard you can hit.
It’s how hard you can get hit and keep moving forward. It’s how much you can
take, and keep moving forward. That’s how winning’s done.”

- Sylvester Stallone (Rocky)

As "boys don't cry" let's then try process builder or flow. Now we are talking! The "Description" field is accessible there! You can use it to perform actions. You can trim your notes! Hell yeah! Let's start!


Before Flow

Before Flow is a Salesforce declarative Trigger substitution. New stuff.

“I love that because that’s what I’m supposed to be doing – whether it’s accepted by everybody or not. I’m supposed to be pushing that envelope and trying new things.” 

— Jay-Z

There is no special purpose of me using it in this business case (you can use Process Builder also) but as it is the new, upcoming (Spring '20) and a very promising feature I wanted to try it here. Let's see how it can be done.


Create a field to store trimmed Task note (Text field storing 255 signs)

Please, please come up with a better name than my "Cropped description" :D Waiting for your ideas in the post comments!

No alt text provided for this image


Create Before Flow

Go to the flow creator and create a new autolaunched flow. Click twice on the Start element and pick the "New or updated record" option to use new before save flow feature.

No alt text provided for this image

Before Flow Elements

Your huge FEATURE will have two elements! (one, two) Start and Assignment.

No alt text provided for this image

Create Formula

You need to create a formula to trim the Description field. Remember that Description was not accessible in field formulas? Surprise! It is accessible in the flow formulas!

No alt text provided for this image

Formula Code

TIP: We can use 252 signs and add three dots on the end to show the user that this is only a trimmed note.

Left({!$Record.Description},252)&"..."


Assignment

Finally, assign the formula to your 255 signs text field. Activate your flow. Test it and it's done! (almost)

No alt text provided for this image

You just need to add the trimmed Description field to the task-related list on the Account page . You don't need to show it on the record page layout. It would look strange :D


The result (Account example)

Please see that you just need to hover your mouse over the note to check the details in the tooltip. Pretty cool, isn't it?!

No alt text provided for this image

Play the movie to see the feature in action:


Hope you liked it!

Best,

Kris

Eduardo Araujo

Account Manager at Fortinet | Experienced tech sales executive fueling growth and expansion

5y

Very creative and interesting!!! 

To view or add a comment, sign in

More articles by Krzysztof Nowacki

Insights from the community

Others also viewed

Explore topics