+ Start a Discussion
Naganjaneya Lakshman TadepalliNaganjaneya Lakshman Tadepalli 

how can you got count of contacts associated to particular account?

There is an account record and for that particular record it has 5 contacts, how can you got count of contacts associated to particular account without clicking account record?

Without clicking on account you can't see how many contact are there. If you want to maintain a count of association of contact on account record, you have to create a field on account and wirte a trigger on Contact, Whenever a contact is created or deleted, the new field on account record will update accordingly.

Ashlekh Gera

This Url will help you


Salesforce by default supports Roll-up summary field on Account->Contacts, as the relationship between Account & Contact is a bit different master detail relationship.

Create a on-click JS or inline Visualforce on Account Detail Page. Within the JS of inline VF execute Apex function which returns the count.

Ashlekh Gera
Anuj PatelAnuj Patel

You can create a Roll Up summery field  on Account that can do the count of an contact associated with the Account. Add the rollup summery field on the Account list View that you have. You will be able to see the number of contacts assoicated wth it.

Let me know if you still have any other isseus.


Anuj Patel
(Help to save someone's time :), so that they can go play with their kids.)