function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Srikanth Challa 3Srikanth Challa 3 

How to Create a Separate related lists for Tasks on Accounts?

Is it possible to create seperate related lists to show Sales Activities(Tasks) and Servic Activities on Accounts?
(Note: We are using lightening currently)

Naval Sharma4Naval Sharma4
Hi Srikanth,

You can query on ActivityHistory and based on the ActivityType field you can filter for your separate related list.
   (SELECT ActivityDate, Description 
    FROM ActivityHistory 
    ORDER BY ActivityDate DESC NULLS LAST, LastModifiedDate DESC 
    LIMIT 500)
FROM Account
WHERE Name = 'Acme'

Srikanth Challa 3Srikanth Challa 3
Thanks for your reply Naval. I can be able to do it by using visualforce page, but does it work in lightening? 
Naval Sharma4Naval Sharma4
What are the challenges you are facing when you are using this query in lightning component.