Skip to content
Snippets Groups Projects
Commit 044bd4cf authored by Alan Bell's avatar Alan Bell
Browse files

fix #108 fire an event on converting a lead

parent bfb5d84f
No related branches found
No related tags found
No related merge requests found
......@@ -265,6 +265,12 @@ function vtws_updateConvertLeadStatus($entityIds, $leadId, $user) {
$leadModifiedTime = $adb->formatDate(date('Y-m-d H:i:s'), true);
$crmentityUpdateSql = "UPDATE vtiger_crmentity SET modifiedtime=?, modifiedby=? WHERE crmid=?";
$adb->pquery($crmentityUpdateSql, array($leadModifiedTime, $user->id, $leadIdComponents[1]));
//raise an event so that modules can take their actions on lead conversion
require_once("include/events/include.inc");
$em = new VTEventsManager($adb);
$em->initTriggerCache();
$entityData = VTEntityData::fromEntityId($adb, $leadIdComponents[1]);
$em->triggerEvent("vtiger.entity.leadconverted", $entityData);
}
$moduleArray = array('Accounts','Contacts','Potentials');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment