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
Aaliya YusufzaiAaliya Yusufzai 

Activity roll up on custom object

I have a "Welcome" custom object and we would like to count the number of activities on this object.  Their is no way of creating a roll up count, so wondering on how to do this (without using Roll up helper).
Tarun J.Tarun J.
Hello Aaliya,

You want to get count of Activities on single object 'Welcome'. You can write custom code to bring the activities count to the parent object.


Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Lokesh KumarLokesh Kumar
Hi Aaliya (Cute Name),

You can easily do this by writing trigger after insert and after delete on Activity Object.

In you trigger write logic to update the custom field "count of activities" on Welcome Object.

let me know if you need any help.