Skip to main content
Thank you for the help
Source Link
Reshma
  • 4.1k
  • 7
  • 29
  • 43

what I can understand from your code is you are trying to access contactId from a List type variable. system.debug(campaignlist.contactid); //---- error Variable doesn't exist:

system.debug(campaignlist.contactid); //---- error Variable doesn't exist:

You need to iterate through campaignList and then access the contactid like below: for(CampaignMember cmp :campaignlist){ cmp.contactId; system.debug('contact id '+cmp.contactId); }

for(CampaignMember cmp :campaignlist){
   cmp.contactId;
   system.debug('contact id '+cmp.contactId);
}

what I can understand from your code is you are trying to access contactId from a List type variable. system.debug(campaignlist.contactid); //---- error Variable doesn't exist:

You need to iterate through campaignList and then access the contactid like below: for(CampaignMember cmp :campaignlist){ cmp.contactId; system.debug('contact id '+cmp.contactId); }

what I can understand from your code is you are trying to access contactId from a List type variable.

system.debug(campaignlist.contactid); //---- error Variable doesn't exist:

You need to iterate through campaignList and then access the contactid like below:

for(CampaignMember cmp :campaignlist){
   cmp.contactId;
   system.debug('contact id '+cmp.contactId);
}

what I can understand from your code is you are trying to access contactId from a List type variable. system.debug(campaignlist.contactid); //---- error Variable doesn't exist:

You need to iterate through campaignList and then access the contactid like below: for(CampaignCampaignMember cmp :campaignlist){ cmp.contactId; system.debug('contact id '+cmp.contactId); }

what I can understand from your code is you are trying to access contactId from a List type variable. system.debug(campaignlist.contactid); //---- error Variable doesn't exist:

You need to iterate through campaignList and then access the contactid like below: for(Campaign cmp :campaignlist){ cmp.contactId; }

what I can understand from your code is you are trying to access contactId from a List type variable. system.debug(campaignlist.contactid); //---- error Variable doesn't exist:

You need to iterate through campaignList and then access the contactid like below: for(CampaignMember cmp :campaignlist){ cmp.contactId; system.debug('contact id '+cmp.contactId); }

Source Link
sunil gupta
  • 281
  • 1
  • 4
  • 17

what I can understand from your code is you are trying to access contactId from a List type variable. system.debug(campaignlist.contactid); //---- error Variable doesn't exist:

You need to iterate through campaignList and then access the contactid like below: for(Campaign cmp :campaignlist){ cmp.contactId; }