AnsweredAssumed Answered

relate field to relationship subpanel

Question asked by Joe Carter on Oct 3, 2016

Hi

 

I have a relate field (Contacts) in the Opportunities Module as our user wants to select the contact on the business card rather than scroll down and add the contact in the sub panel.

 

They then need that contact add to the subpanel but my code keeps giving error 500

 

Code is

 

$contactid = $bean->contact_id_c;
if($contactid != ''){
  $opp->load_relationship('opportunities_contacts');
  $opp->opportunities_contacts->add($contactid);
}

 

Any body have any ideas why this fails?

 

Any help much appreciated.

Outcomes