[Vtigercrm-commits] [vtiger development] #7164: Failing to add 'ToDo' or 'Event' for leads
vtiger development
vtiger-tickets at trac.vtiger.com
Tue Oct 18 05:56:43 PDT 2011
#7164: Failing to add 'ToDo' or 'Event' for leads
------------------------+---------------------------------------------------
Reporter: venkat | Owner: asha
Type: defect | Status: assigned
Priority: major | Milestone: 5.3.0
Component: vtigercrm | Version: wip
Resolution: | Keywords:
------------------------+---------------------------------------------------
Comment (by jcrisp):
Added a diff file which is a temporary fix and seems to work for me. There
is nothing to catch the situation where setype is neither Contacts or
Accounts.
Following is without warranty :-)
{{{
function getParentName($parent_id)
{
global $adb;
if ($parent_id == 0)
return "";
$sql="select setype from vtiger_crmentity where crmid=?";
$result=$adb->pquery($sql,array($parent_id));
//For now i have conditions only for accounts and contacts, if
needed can add more
if($adb->query_result($result,'setype') == 'Accounts')
$sql1="select accountname name from vtiger_account where
accountid=?";
else if($adb->query_result($result,'setype') == 'Contacts')
$sql1="select concat( firstname, ' ', lastname ) name from
vtiger_contactdetails where contactid=?";
else $sql1="select setype from vtiger_crmentity where crmid=?";
$result1=$adb->pquery($sql1,array($parent_id));
$asd=$adb->query_result($result1,'name');
return $asd;
}
}}}
--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7164#comment:4>
vtiger development <http://trac.vtiger.com/>
vtigerCRM
More information about the vtigercrm-commits
mailing list