+ Start a Discussion

How to access Campaign field in lead object from visualforce

Hi All,

   I want to access campaign field in lead object  from visualforce using custom controller.

Leads and campaigns are not related to each other.For this,I want to create junction object between leads and campaigns.But,we  cannot create a master detail relationship from custom object to leads.Then how?

Can anyone help me?

Kindly support and suggest.
Campaign and Lead contains a junction object named "CampaignMenber". Here is its details:  https://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_campaignmember.htm

By querying on CampaignMember you can get Lead from it.