Opportunity Contact Role

I’m trying to build out a table like functionality from an Opportunity record, where the user can see Contacts assigned as Contact Roles against that Opportunity, and be able to create a new Contact and select the Contact Role and link it to the Opportunity.

Is this possible? What’s the best approach for this? I looked at having 2 models and using a Subquery, but couldn’t quite get it to work (as the Join Object only allowed me to select from the standard objects, not a model that I’ve created).

Thanks!

Take a look at this sample page,   It is a wizard that allows you to create a new contact and define their role for the current opportunity, and for other open opportunities within the same account.  It will probably give you a few hints. 

Copy the xml in this file into a new page in your org.