• chrissy111
  • NEWBIE
  • 5 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies

On the standard CampaignMember object, I have a custom lookup field that I am trying to populate....It links to the Lead object and is called "SFDC_Lead__c".

 

I'm trying to create a trigger that populates this fields with the value from the standard campaignmember field "Lead".  This is what I have so far, although it doesn't work:

 

trigger SetCampaignMemberLeadField on CampaignMember (before insert, before update) {    for (CampaignMember a : Trigger.new) {        a.SFDC_Lead__c = a.Lead.Id;    }}

 

On the standard CampaignMember object, I have a custom lookup field that I am trying to populate....It links to the Lead object and is called "SFDC_Lead__c".

 

I'm trying to create a trigger that populates this fields with the value from the standard campaignmember field "Lead".  This is what I have so far, although it doesn't work:

 

trigger SetCampaignMemberLeadField on CampaignMember (before insert, before update) {    for (CampaignMember a : Trigger.new) {        a.SFDC_Lead__c = a.Lead.Id;    }}

 

I followed this demo but can't list custom objects in the tabs.
If my custom object is "Transfer Station" and is child to Account in Master - Detail relationship, how do I code this?
I was able to figure out Closed Activities, Contracts, on my own, but beyond that, no custom object.
Code:
 <apex:tab label="Open Activities" name="OpenActivities" id="tabOpenAct">
         <apex:relatedList subject="{!account}" list="OpenActivities" />
      </apex:tab>
 <apex:tab label="Closed Activities" name="ActivityHistories" id="tabClosdAct">
         <apex:relatedList subject="{!account}" list="ActivityHistories" />
      </apex:tab>

 
Those work. How would Transfer Station get in there? Thanks in advance!

  • October 22, 2008
  • Like
  • 0