Skip to main content
We created a custom report to sum up the duration field from activities (tasks and events) linked to Projects (custom object).  We are experimenting with adding tasks/events to 'Projects' using the Related To field.  

 

Ideally, we'd be able to show a calculated sum of the minutes in a 'Total Days Worked' field.  Not sure if this can be accomplished via DRLS or some other means.  Currently we just display a report chart on the Project record, but we'd also like to see it in list views.
2 answers
  1. Feb 6, 2021, 10:31 AM
    Hello Damon,

     

    So you are trying to sum up days worked from a Task onto the Project Record ?

     

    The best way to achieve this is via a Apex Trigger that runs based on criteria OR a Apex Bath that runs overnight to update the totals - I guess it depends on how up to date you want this field to be. 

     

    Alternatively you could use a Flow to achieve the same, perhaps a Record Triggered or Auto Launched Flow when a Task is updated that related to a Project but depending on how many tasks you may have you could need to Bulkify the flow to avoid hitting Salesforce Limits. 

     

    If this helps please mark as best. 

     

    Thanks Tom
0/9000