I would like to add the email of the lead to the notification message that is sent when a lead is assigned.
SugarCRM Open Source v5b
IIS
I have edited the /include/language/en_us.notify_template.html as follows:
Name: {LEAD_NAME}
Email: {EMAIL1}
Phone: {PHONE_WORK}
Lead Source: {LEAD_SOURCE}
Status: {LEAD_STATUS}
Description: {LEAD_DESCRIPTION}
I have edited the /modules/leads/lead.php as follows:
function set_notification_body($xtpl, $lead)
{
global $app_list_strings;
global $locale;
$xtpl->assign("LEAD_NAME", $locale->getLocaleFormattedName($lead->first_name, $lead->last_name, $lead->salutation));
$xtpl->assign("LEAD_SOURCE", (isset($lead->lead_source) ? $app_list_strings['lead_source_dom'][$lead->lead_source] : ""));
$xtpl->assign("LEAD_STATUS", (isset($lead->status)? $app_list_strings['lead_status_dom'][$lead->status]:""));
$xtpl->assign("LEAD_DESCRIPTION", $lead->description);
$xtpl->assign("EMAIL1", $lead->email1);
$xtpl->assign("PHONE_WORK", $lead->phone_work);
return $xtpl;
}
The email field does not get assigned to the notice email message.
I have also tried print_r($lead) This shows that the email1 variable to be empty.
How do I get the lead email into the notice message. Also does anyone know if it is possible set the reply-to of the notice message to the lead email address?
Thank you for your help.


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks