Totals in Account Detail Tab

  • 1
  • Question
  • Updated 5 years ago
  • Answered
I know I can use a merge variable like {{$Model.Contacts.data.length}} to insert the model count in the tab label, but using your Account Detail page, you suggest listing both Tasks and Events separately.

Is there a way to sum the number of Tasks & Events in the tab label?
Photo of Jacob Flatter

Jacob Flatter

  • 1,512 Points 1k badge 2x thumb
  • happy

Posted 5 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
This is one of the GRRR Salesforce moments.  There are objects that combine both entities (OpenActivities,  Activity History) -and it should be trivial to create a model on those objects that counts the records - which you could then use as you describe above.  But Salesfore doesn't allow querying on those objects. 

Now a GRRR SKUID moment... We have not exposed the same sort of javascript hooks to the tab lable as we have for fields or other aspects.  (No custom renderer option....)   So no easy way to do math in javascript. 

One of the other devs may have a solution,  but for now I think you can provide numbers for Tasks and Events separately,  but not together.