Here are options, examples, my comments, and my requirement for different approaches to creating Opportunities from the Standard Contact Detail Page.

I am looking for help with option 3. I need to "guarantee" that the viewed Contact is pulled through (mapped, brought over, carried over) to the Opportunity as an OpportunityContactRole. Options 1 and 2 do not guarantee it.

Option 1 (i considered this, but it will not solve my question)

  • From the Standard Contact Detail Page the Standard Opportunity Related List's standard "New" button does not pull contact information to the resulting opportunity therefore is not a good solution.

Option 2 (i considered this, but it will not solve my question)

  • There's a great article about this option. From the Standard Contact Detail Page a custom "New" Opportunity URL Button placed in the Opportunity Related List or placed on the standard Contact Detail Page could pull contact information to the resulting opportunity (via URL params) but it is not guaranteed because the user can always change (hack) the URL parameters in their browser to omit the "conid" parameter therefore solutions like this (though helpful to some people) are not ideal if you want to guarantee that contact attribution happens on the resulting opportunity
  • Another challenge with this approach is when you have custom Read Only fields on Contact that you want mapped (brought over) to the resulting Contact. In such scenario passing the values via URL parameters is not possible because the datafields in this scenario are read only in field-level security (FLS). This is the requirement I have so I need to explore option3 below.

Option 3 (How would you further design this option 3 to solve the question and to meet the requirements below?)

To guarantee that Opportunities created from Contact Page have the Contact as an OpportunityContactRole, maybe we create a visualforce button on the standard contact detail page that calls server-side apex.

  • I assume this approach is capable of preventing the user from omitting the OpportunityContactRole. How might we do this?
  • Perhaps the button could call apex that inserts the opportunity & OpportunityContactRole but the example found here gives the user no edit screen prior to inserting the record which is bad user-experience.
  • I require a button labeled "Create New Opportunity" to be placed on the Standard Contact Detail Page. When clicked, the button must redirect the user to a page where they can edit new opportunity information. I want them to have a cancel and save button. If they click cancel they should be redirected back to the Contact record. If they click save then I want the opportunity & OpportunityContactRole to be inserted. Assuming that the solution involves visualforce, I dont want to have to maintain the visualforce page later in time so I want its form fields to dynamically generate based on whatever fields are required on Opportunity.

Thank you!

  • downvote no feedback? – Peter Noges Sep 12 '17 at 17:34
  • 1
    I didn't downvote, but this post is a bit hard to read, I am not clear on what your exact question is. Remember that many users of this community check infrequently for just a few moments at a time, so a broad question with a lot of noise such as this may be difficult to answer. Also, this is currently in the queue to be closed as "too broad," so I'd try to edit it and narrow down to a specific question if possible. – Brian Mansfield Sep 12 '17 at 17:44
  • thank you Brian, i cleaned up the layout of the question. – Peter Noges Sep 12 '17 at 19:03

I found the answer I needed. Simply put, unlike Lead Conversion, the standard "new opportunity" button on Contact Detail Page passes attribution to the resulting opportunity via URL parameters and I required passing read only fields between objects therefore the solution I found replaced that button, calls a visualforce page, and uses apex to meet custom requirements.

| improve this answer | |

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.