What is the process to have a lead capture form/data automatically populate in a unique and specific target list e.g. "Target List From Website" ???
Thanks Much,
Community Edition
What is the process to have a lead capture form/data automatically populate in a unique and specific target list e.g. "Target List From Website" ???
Thanks Much,
Community Edition
Hi zmikko
You can edit the WebToLeadCapture.php file and add the code
Where 'prospect_list_id' is the id of the "Target List From Website"PHP Code:$lead->load_relationship('prospect_lists');
$lead->prospect_lists->add('prospect_list_id');
Just bellow the line
CheersPHP Code:$lead->save();
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
Thanks Andopes, you've answered a lot of my questions!
I know this is an old thread but I've been looking for an answer to no avail. I'm using Sugar Community Version 5.5.0 (Build 6653). Can the prospect_list_id be a variable that is pulled from different web forms so that leads are assigned to different target lists based on where they came from? Or is that already what's going on here and I'm missing something? Is this code viable for my version?
Did you find out whether this code is still valid for 5.5? I'd really like to be able to do the same thing.
EDIT --- for 5.5, the instructions are very similar. Here's where I put my code
$lead->load_relationship('campaigns');
$lead->campaigns->add($camplog->id);
//BEGIN NEW CODE
$id_of_target_list="d68463a3-d15a-6970-aecf-4be28eba690a"; //Id of my target list
$lead->load_relationship('prospect_lists');
$lead->prospect_lists->add($id_of_target_list);
//END NEW CODE
if(!empty($GLOBALS['check_notify'])) {
$lead->save($GLOBALS['check_notify']);
}
else {
$lead->save(FALSE);
}
Last edited by tomkerswill; 2010-05-06 at 09:46 AM. Reason: Provide fix
Thanks Andopes, you've answered a lot of questions! you are genius..i must say..
Hi andopes, i've done what you suggest, but now i'd like to create a new Web to Lead Form which links the leads into a NEW target list. Is there any possibility of doing this two times at the same time?Hi zmikko
You can edit the WebToLeadCapture.php file and add the code
PHP Code:
$lead->load_relationship('prospect_lists');
$lead->prospect_lists->add('prospect_list_id');
Where 'prospect_list_id' is the id of the "Target List From Website"
Just bellow the line
PHP Code:
$lead->save();
Cheers
Hi
Is it possible to add the leads to a specific target list based on what they filled in in the lead form?
Also - is it possible to add names, emails etc to the contacts intead of to the leads via a form on your website.
Am new to sugar, so not really sure how it is meant to work.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks