Strap in, as this may turn into TL;DR.

Within Opportunities, we have created a custom object called Marketing_Support__c. When the 'new' button is clicked it takes you to a page where you can choose the record type (currently: Proposal Planning Worksheet or Other Marketing Support). Once a choice is selected and continue is pressed, the user is taken to a form to put more details in. Previous direction from other sources recommended that I a)create a controller to do some concatenation magic and auto population of a number of fields pulled from Opportunity and b) create an interstitial page where the controller can reside passing the values from the Opportunity to Marketing support.

I get confused when working with the controller. How do I pull the information from the fields in Opportunity and (after mangling one value with concatenation logic) push it into this object? Is Opportunity considered a page(as I thought it was an object)? Is there some parent-child relationship that I should be looking into?

1 Answer 1


I'm not quite sure of all the requirements, but it sounds like you may be able to get away with no code here. Marketing_Support__c should have a lookup or master-detail relationship with Opportunity. You can add the Marketing Support related list to the Opportunity page layout. When you click the New button in the related list, Salesforce prefills the opportunity lookup field for you. With this relationship defined, you can use formula fields and workflow rules with field updates to populate data on the Marketing Support record.

  • Other than some recycled formula work, you were indeed correct. I was originally steered in the wrong direction, and have since gone back to my declarative ways. Thanks!
    – SQLHound
    Commented Oct 30, 2013 at 15:58
  • Update: I was able to fix this issue with a url hack, seeing this info on Ray Dehler's blog. Mind-blowingly awesome.
    – SQLHound
    Commented Dec 6, 2013 at 13:18

You must log in to answer this question.

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