Reply
Contributor
HLZBIS
Posts: 3
Accepted Solution

Issue getting a formula field looking up on contacts from campaign members

Hello everybody, 

I need to find a way to get information from the contact object onto the campaign member object for reporting purposes.

 

Unfortunately there is no way to create a formula field on the campaign member object looking up onto the contact object because there's no real link between these two objects. 

 

Any ideas to workaround this and getting information from the contact onto the campaign member object ? 

Looking forward to hearing from you,

 

Harold

Super Contributor
jkucera
Posts: 730

Re: Issue getting a formula field looking up on contacts from campaign members

I'm assuming this is a custom field on Contact as the standard fields are available out of the box for Campaign Members and CM formula fields.

 

A trigger will let you do cross object updates.  How would you know which member to update?  All of them?

 
John Kucera
Product Manager - Salesforce Chatter
Free Chatter Unfollow Rules App
Super Contributor
Stevemo
Posts: 3,210

Re: Issue getting a formula field looking up on contacts from campaign members

What specifically are you looking for?  Have you tried the standard Campaigns with Contacts report?  That should have full visibility to standard and custom Campaign, Contact, and Campaign member fields. 
"If you're in a band and you think that you're good, you probably suck. If you're in a band and you think that you suck, you probably do." - Bob Pollard
Regular Contributor
Mycodex
Posts: 50

Re: Issue getting a formula field looking up on contacts from campaign members

We have a custom field called "Business Unit" on the contact object and our marketing team would like to see the campaign member's business unit when they are viewing the related list on a campaign. It seems like the campaign member object is just a deadend object that doesn't link to much. I can't seem to create a cross-object formula to look up fields on the contact object unless I'm missing something.
Super Contributor
jkucera
Posts: 730

Re: Issue getting a formula field looking up on contacts from campaign members

Right now there isn't a standard solution for this. 

 

To avoid cascade update problems, this may be the best solution:

1) Create custom lookup field that points to contact (this allows formula fields to contact fields)

2) Create a campaign member trigger that fires after insert - if CampaignMember.ContactId is populated or added, copy that ID to the new custom field

3) Create a contact trigger that fires upon create - if this is a converted lead, find all campaign members and copy this contact ID to the new custom field

 

You can hide the new contact custom field and you'll be able to create campaign member formula fields based on contact fields.

John Kucera
Product Manager - Salesforce Chatter
Free Chatter Unfollow Rules App
Regular Contributor
ShawnF
Posts: 30

Re: Issue getting a formula field looking up on contacts from campaign members

[ Edited ]

...But...

 

If you look at the list of standard fields on the Campaign Member object, there is already a Lead lookup and a Contact lookup.

 

Since the Lead and Contact lookup fields are already there, why then do we not have the ability to reference fields from either the Lead or Contact object? Referencing field values from associated objects has been "standard" for some time now.

 

For example, this screenshot: http://screencast.com/t/YTZiYTNhMDc

 

 

Message Edited by ShawnF on 01-19-2010 03:14 PM
Regular Contributor
ShawnF
Posts: 30

Re: Issue getting a formula field looking up on contacts from campaign members

[ Edited ]

I'm wanting to do something very similar to what is listed above: my marketing department wants a value from the associated Lead or Contact to show on the Campaign Member layout.

 

Here are the facts:

 

  • On the standard Campaign Member object there is a lookup field for the associated Lead or Contact.
  • In my org, I have a field called "Lead Rank" on my Lead and Contact objects that is a picklist of 1 - 5.
  • I want that Lead Rank value from the associated Lead or Contact to show on the Campaign Member by referencing the (for example) Lead__r.Lead_Rank__c value in a formula field.
  • When I begin creating my formula field on the Campaign Member object, I cannot reference ANY of the fields from the associated Lead or Contact in a similar fashion to this screenshot.


How then, can I bring the "Lead Rank" value from the Lead or Contact object on to my Campaign Member object?

Message Edited by ShawnF on 01-19-2010 03:12 PM
Message Edited by ShawnF on 01-19-2010 03:13 PM
Message Edited by ShawnF on 01-19-2010 03:13 PM
Super Contributor
jkucera
Posts: 730

Re: Issue getting a formula field looking up on contacts from campaign members

This is a gap we'll fix in the June release (safe harbor) - there was a technical constraint that made it hard to do prior to this release.

 

In the meantime, to expose Lead Rank, you can follow the steps I mentioned above of creating a dupe custom field for lead & contact & populating in a trigger.

John Kucera
Product Manager - Salesforce Chatter
Free Chatter Unfollow Rules App