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

Visual force dynamic SOQL queries on custom fields
I am having an issue with this SOQL query doesn't recognise the relation ship between a campaign and a contact
heres the code
public String crmid { get; set; }
public List<SelectOption> getValues(){
cmoptions.clear();
cmoptions.add(new selectOption('--None--','--None--'));
for(Campaign camp:[select id,name, (select id,status,contactId,Status_Changed__c,Call_Result__c, Contact.Account.PersonMobilePhone, Contact.Account.PersonEmail, Contact.Account.Name, Contact.Account.G1_Client_Relationship_Manager__c,Contact.Account.Mobile_Clean__c, Contact.Account.PersonHomePhone,Contact.Account.PersonMailingStreet, Contact.Account.PersonMailingCity,Contact.Account.PersonMailingState, Campaign.name from CampaignMembers) from Campaign WHERE Campaign_Call_List__c = true AND Contact.Account.G1_Client_Relationship_Manager__c = :crmid ORDER BY Name ASC]){
cmoptions.add(new selectOption(camp.id,camp.name));
maplstcm.put(camp.id,camp.campaignmembers);
}
return cmoptions;
}
using your campaignId. Then update your lists and maps as needed.