We utilize our instance to manage deal flow in an economic development firm. We currently use Opps with the Record Type of 'ESP Services' to identify companies that we are working with, and then use Opportunity Contact Roles to show contacts and which staff member is working with the company. For reporting purposes, we have developed a trigger that pulls the Role of 'TC Staff' and displays it at the top of the 'ESP Services' Opp.

To complicate things, we use other Opportunities such as 'ESP Funding' and 'Expert Network' to manage other services that we provide, all on a contingent basis.

For reporting on these other opportunities, it has been requested to see if we can pull the 'TC Staff' role from the 'ESP Services' Opp and put it on the 'ESP Funding' and 'Expert Network' ones.

Is there a somewhat easy way to accomplish this? One thing I was contemplating was pulling the ESP Services advisor field to the account and then populating it from there. But, that seems like a needless loop. Other thoughts would be to pull over the Opportunity Contact Role to all Opportunities, but would all need to be refreshed as advisors change.

Any thoughts would be greatly appreciated.

1 Answer 1


it will require code, but you can include a custom visualforce page inline on the opportunity detail page. that vf page would utilize a controller extension of the Opp standard controller.

Once you've written your controller extension to identify the related records and pull the TC Staff Role field, you can then display that with a apex:outputField tag.

  • Kevin, thanks for the response. That's waht I thought but aren't too familiar with vf and the controllers - but somewhat comfortable with APEX. Do you have any resources you could point me to?
    – Matt P
    Commented Sep 19, 2013 at 13:30
  • Resources eh? Well how about this, let me throw up an example Apex controller extension in a gist with a ton-o-comments and the matching VF page w/ comments. It won't directly apply to your situation --because i don't know what field you're wanting etc.-- but it'll give you an example. Also, If you'd like you can hit me up on IRC irc.freenode.net #salesforce (ask for CodeFriar) or on ScreenHero -- we can do a Pair programming session and get you squared away.
    – Kevin P
    Commented Sep 19, 2013 at 18:26
  • @mattPieper Check this out: gist.github.com/noeticpenguin/a913b6952758d246b559 It totally screwed up my tabs. sorry.
    – Kevin P
    Commented Sep 19, 2013 at 19:02
  • Thanks for the help @Kevin P. Sorry for the delay in approving the question, been hectic around here, totally worked.
    – Matt P
    Commented Oct 3, 2013 at 14:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .