function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mindrayITmindrayIT 

Create an Opportunity from a Contact and fill in a custom field

Hello - I have very minimal Apex coding experience so please bear with me.  We have a custom Contact lookup field in Opportunities that the users are expected to associate a contact to the new Opportunity.  Some users create the Opportunity directly from a Contact that they have open and would like the Contact filled in for them.  I see that the Contact is added as a Contact Role and seems to be done through a parameter in the URL like "&conid=0033000000nM2l0".  Can I use that info to put it into our custom Contact lookup field for the new Opportunity?

 

Thanks for any code examples that you can point me to...