Created
January 27, 2015 11:16
-
-
Save amusarra/844ab567edc25948ce00 to your computer and use it in GitHub Desktop.
Add Contacts To ProspectList
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_once('modules/ProspectLists/ProspectList.php'); | |
$rel_name = 'contacts'; | |
$contact_id = 'id_of_contact_to_link from $bean object'; | |
$prospectList_id = 'id_of_prospect_to_affect'; | |
$prospectList = new ProspectList(); | |
//Load a specific opportunity | |
$prospectList->retrieve($prospectList_id); | |
$prospectList->load_relationship($rel_name); | |
//Note use of $rel_name | |
$prospectList->$rel_name->add($contact_id); | |
$prospectList->save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment