Workflow Convert Opportunity to Project

Hi all

I have succesfully make a workflow that converts won opportunities to new projects. I’ve managed to carry forward all the fields except for ‘contact’ explained further below.

There is no option to map the contact field in the workflow, has any one any ideas?



The contact or contact(s) related to the Opportunity is not a field, its a relationship. If you want to carry the contacts related to the opportunity over to project you have to map the relationship. I don’t think you can do this through workflow. I’ve always written a before save hook to map the contacts over. If you had a field in Opps like “main contact” and wanted to carry that over to Projects you could. Really what you want to do is write a hook that loops through the relationships of the Opportunity and then copies them over to the relationships of the project. ( think anyway unless someone has a better idea).


Thank you for your reply. I thoughtthat might be the case, I made the relationship but it doesn’t want to work. So I thought it might come down to a hook, unfortunately thats really not my field of expertise. I’ll reach out to a dev I use and see what they can do.

Thank you


Here’s what I use for my clients. Typically I’m copying custom relationships over on convert. But this could be adapted to your situation. You could customize the “if” condition for example to opportunity = won or something…

In the example he’s copying over notes, but it could be modified to copy over contacts.

Here’s how I’ve used it for contacts:


Project: Relation Transfer
Original Dev: Angel Magaña, March 2012
@2012 Angel Magaña

Desc: Logic Hook for Transferring Relation

The contents of this file are governed by the GNU General Public License (GPL).
A copy of said license is available here:
This code is provided AS IS and WITHOUT WARRANTY OF ANY KIND.

class DataTransfer
 function doDataTransfer($bean, $events, $arguments)
  $action  = $_REQUEST['action'];
  if ($action == 'ConvertLead') //Must confirm it only triggers on conversion!!
   $lead_id  = $bean->id;
   $contact_id = $bean->contact_id;
   //Remove relationship 
   $rcontacts = array();
   foreach ($bean->leads_contacts_1->getBeans() as $rcontact)
    $rcontact_id = $rcontact->id;
    $rcontacts[] = $rcontact_id;   
    $bean->leads_contacts_1->delete($lead_id, $rcontact_id);
   //Transfer relationship to Contact record
   $contact = new Contact();
   foreach ($rcontacts as $rcontact)


1 Like

That’s great thank you I’ll have a go