neojet
Joined: 07 Dec 2005
Posts: 41
Location: Marseille (France)
|
| Posted: Fri Jul 18, 2008 8:34 am Post subject: Add more fields in email templates |
|
|
Hi.
I would like you add more fields for merged emails, by using custom fields for each module for example.
Add account custom fields for Account selection you see?
I think that the function getMergedDescription() manages this but I don't know how to modify this code to do what I want.
Code:
switch($parent_type)
{
case 'Accounts':
if(is_array($fields["accounts"]))
{
$columnfields = implode(',',$fields["accounts"]);
$query = 'select '.$columnfields.' from vtiger_account where accountid ='.$id;
$result = $adb->query($query);
foreach($fields["accounts"] as $columnname)
{
$token_data = '$accounts-'.$columnname.'$';
$description = str_replace($token_data,$adb->query_result($result,0,$columnname),$description);
}
}
break;
Do you have an idea? |
|