+ Start a Discussion
Victor EcheverríaVictor Echeverría 

Auto populate custom field in opportunities with primary contact information

I'm relatively new to visualforce and I'm trying to display the primary contact information in a visualforce page that is created by a button in the opportunities object. For that I have a custom field in the opportunities page layout which I want to auto populate with the primary contact for the opportunity.  What would the best method for obtaining the primary contact information from contact roles? Is there a way for the field to auto populate when the opportunity is created?