To increase sales productivity, I want to see the last task's subject on contact records as well as a hyperlink so it can be used in contact list views and reports.
Create 3 Fields on Contact:
Text Field: Last Task Completed
Text Field: Last Task Completed ID
URL Field: Last Task Completed Link
Rollup the Subject of the last task completed.
Select Destination Object: Contact
Select Target Field: Last Task Completed
Select Source Field
Which Object: Task
Select Relationship: Name ID-Task.WhoId
Which Field: Subject
Select Type: Text
Create New Filter (Most Recent Completed)
Step 1) Enter Filter Name, Limit to 1 Record
Step 2) Specify Sort Order
Due Date Only
Descending Order
Step 3) Specify Filter Criteria
isDeleted = false (default)
Status = Completed
Save and Run the rollup.
Rollup the ID of the last task completed.
Select Destination Object: Contact
Select Target Field: Last Task Completed ID
Select Source Field
Which Object: Task
Select Relationship: Name ID-Task.WhoId
Which Field: Activity ID
Select Type: Text
Select Filter: Most Recent Completed
Save and Run the rollup.
Workflow Field Update for Last Task Completed Link (Setup>Create>Workflow & Approvals>Workflow Rules>New Rule)
Object: Contact
Rule Name: Last Task URL
Evaluation Criteria: created, and every time it’s edited
Rule Criteria: Contact: Last Task not equal to Null
Immediate Workflow Action: Field Update (Last Task Completed Link)
Name: Task URL
Unique Name: Task_URL
Re-evaluate Workflow Rules after Field Change = True
Specify New Field Value
Use a formula to set the new value
'https://slightning1-dev-ed.my.salesforce.com/' + Task_ID__c (Use the URL from your org.)
Create new Contact Reports and List Views. You can customize your report and list views in any desired manner.
For further assistance with this use case or to learn more about Rollup Helper, please schedule a One on One Demo.
Need help?