8

Activity has a 'related to' field that links it to an object of various types. I need to link each activity to a Campaign, but also to an Opportunity. However Activity custom fields don't let me add a lookup relationship.

The reason I need this is that if I talk to John Doe (Contact) about his WidgetBoxes subscription (Opportunity) I need to record that the call was part of the August2012 Campaign.

This lets me find all Activity logged against this particular Campaign. It also lets me find all Activity logged against WidgetBoxes and it also lets me find every time we called John Doe.

Is there something I'm missing that would let me add this extra relationship?

Is this a Black Tab setting that Salesforce could turn on for me internally?

10

SFDC does not allow this currently. You cannot add lookup fields or junction objects to Tasks to enable what you want to do.

Workaround today include creating your own Task object and recreating Task functionality. This is how Milestones PM Application on AppExchange works (Source is available on GitHub).

Pros:

You can relate a Task to multiple Objects in the System. Gives you flexibility to cusotmize however you want within confines of Force.com. Formula Fields, Roll Up Summaries, etc.

Cons:

You lose ALL the special features of Activities like:

Outlook Integration Popups (Nag Boxes) for Task Reminders Activities History Rollups on Account Activity Archiving etc.

One final note:

As of Summer 12 release they added the ability to relate an Activity (Of Type TASK) to multiple Contacts. You need to enable that in Setup Menu under Customize->Activities->Tasks.

The API object for the junction is "TaskRelation". This was a HUGE step up as before you could only relate one object and one contact to an Activity. Now you can do one object and up to 10 Contacts. If you inspect the TaskRelation object you will note that it stores both information for Contacts as well as Objects. #SAFEHARBOR It's possible in the future SFDC may use that object to relate to multiple Objects, the architecture supports it. Just a matter of performance I'm sure which is a huge consideration for SFDC.

It may be in your best interest to wait it out and see if they enable this in a future release.

UPDATE WINTER 15 SFDC is opening up this functionality as a BETA - "Add Custom Lookup Fields on Activities (Beta)". Page 107 of Release notes: https://help.salesforce.com/help/pdfs/en/salesforce_winter15_release_notes.pdf

  • Great information .. and gives me hope. Certainly sounds like they're on their way to giving this extra functionality, but it's a bit strange that they've given us multiple contacts rather than generally multiple objects. – RickMeasham Aug 15 '12 at 23:33
  • I can understand multiple people: you might be in a meeting with four decision makers. But what if that meeting is to get signoff on four Opportunities? – RickMeasham Aug 15 '12 at 23:33
  • SFDC is very protective of their performance. Task and Events, due to their polymorphic nature, really hit the performance on the system. That is the only reason I can think of why they haven't released this sooner. Of course I am only speculating (SAFEHARBOR!), but it is my hope that eventually they extend the TaskRelation object to allow multiple objects to a single task. Until then.... courage! :) – CoryCowgill Aug 16 '12 at 4:36
4

Salesforce is releasing this functionality as a pilot in the upcoming Summer '14 release. This has been one of the high rated ideas and should be available soon.

https://success.salesforce.com/ideaView?id=08730000000BrPdAAK

https://success.salesforce.com/06930000003y2gi

  • I think you mean summer 14? – ca_peterson May 19 '14 at 22:48
0

There is no straight forward or OOB functionality to achieve this, although you can look at custom VF and controller to get desired result.

0

You can link your Opportunity to a Campaign using the "Primary Campaign Source" standard field.

If you then link the Activities to the Opportunity you should be able to find them again later by filtering by Opportunities that are linked to a specific Campaign.

Can you give any more info on how your planning to find these Activities? (I.e. Via a report or Apex)

  • And you can use the 'Who' field (field label: Name) to lookup the contact – Daniel Blackhall Aug 15 '12 at 9:47
  • The problem with this is that it's the opportunity that has the campaign, not the activity. So if there's an Opportunity to sell a WidgetBox subscription, and that opportunity is closed over multiple Campaigns, the single Campaign on the Opportunity doesn't give us the information we need – RickMeasham Aug 15 '12 at 23:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.