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
KeerthigeeKeerthigee 

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.
AshwaniAshwani
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.