You need to sign in to do that
Don't have an account?

How do I create a class that includes all contacts related to accounts related to a campaign?
I want to create a VF page that shows fields from all contact records that belong to accounts related to a particular campaign. To do that I'll need to create a class in Apex that pulls all contacts with any of the account IDs that belong to campaign members. I understand it will involved nested statements, but I'm not quite sure how to get started. Thanks.
Crete your controller like this. FinalConList contains all contacts related to accounts related to the Campaign . You can include all fields of contact in query(FinalConList query) and extend columns in VF.
VF page,
Let me know if it helps.
If u want on final contact list then change the line no 17 as shown below,