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
Peter CowenPeter Cowen 

Counting number of public comments on a case

Is there a way of having a count of the number of public comments that are on a case either by using a trigger or workflow.
Mahilde ZucaroMahilde Zucaro
Hi Peter,

can you please explain why you want to use a workflow ? You can use an Apex class in the workflow and count with a Select on CaseComment.

Regards,
Mathilde
Peter CowenPeter Cowen
I read doing a count of public cases was possible using a workflow. If a trigger is easier to count the number of comments on the case that are public.