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
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?
AshlekhAshlekh
Hi,

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.

Thanks
Ashlekh Gera
 
AshlekhAshlekh
Hi,

This Url will help you

http://ericsantiago.com/2009/12/11/contactscases-rollup-for-accounts-in-salesforce/

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.

-Thanks
Ashlekh Gera
Anuj PatelAnuj Patel
Hi,

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.

Regards.

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