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
UshaUsha 

hello,i want to display the all contacts in vf page for a particular account.how it is possible give some advice

Best Answer chosen by Usha
veda Hebbarveda Hebbar
Hey Usha,

Please mark as Best Answer. :)

Thanks,
Veda

All Answers

veda Hebbarveda Hebbar
Hi Usha,

If you are passing AccountId in URL. Please follow below steps:

1: Create controller for the vf page.
2: In constructor query all the contact  with which is child of AccountId which you are getting from URL parameter.
Example: 
    String strAccountId = apexpages.currentpage().getparameters().get('AccountId');
    List<Contact> lstContacts = [Select Id, Name,AccountId From Contact Where AccountId =: strAccountId ];
3: In vf page use 'lstContacts' to display contacts.

Thanks,
Vedashri
veda Hebbarveda Hebbar
Hi Usha,

Are you able to solve ? Please let me know if you need more information or help on this.

Thanks,
Vedashri
UshaUsha
kk thanks
Veda Hebbar
veda Hebbarveda Hebbar
Hey Usha,

Please mark as Best Answer. :)

Thanks,
Veda
This was selected as the best answer
UshaUsha
kk ;)


veda Hebbar