Badge count on unread emails of multiple cases

I’m working on a service where I have created a Sub tab and page for only unread messages across all cases for the service.

I want to use the badge count to highlight on the home page of the service when a new message has been received. At the moment they would only see there is a new message if they go into an individual case. What I want to do means having the badge count on the Sub tab but I just can’t work out how to get it to work.

Any suggestions would be very welcome.

As you have to go to “a many” relationship to show a badge this seems tricky. There might be a better way to do this, but here’s my idea:

  • create an object with a single record in it
  • add a 1-many rel between this new object and messages
  • make this record a special record
  • create a rule on message record created to add a relationship to the special record
  • use the new object as the base object for your subtab
  • count the messages (with the subset of unread you require)

Someone else might have a better idea…