Skip to content
Snippets Groups Projects

fix #19 preserve created by and created time on lead conversion

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
280 280 $tableList = $meta->getEntityTableIndexList();
281 281 $tableIndex = $tableList[$tablename];
282 282 $adb->pquery("UPDATE $tablename SET isconvertedfromlead = ? WHERE $tableIndex = ?",array(1,$id));
283 //copy forward the created time and creator of the lead to the converted objects
284 //from a user perspective, it isn't a new entity, it is a converted entity
285 $adb->pquery("UPDATE vtiger_crmentity newmod,(select createdtime, smcreatorid from vtiger_crmentity WHERE crmid=?) leadmod set newmod.createdtime=leadmod.createdtime,
  • Maintainer

    Converted time marks the beginning of Contact life-cycle. This was desired in few cases - to setup some workflows. So need to consider bit more on handling this.

  • Alan Bell
  • 280 280 $tableList = $meta->getEntityTableIndexList();
    281 281 $tableIndex = $tableList[$tablename];
    282 282 $adb->pquery("UPDATE $tablename SET isconvertedfromlead = ? WHERE $tableIndex = ?",array(1,$id));
    283 //copy forward the created time and creator of the lead to the converted objects
    284 //from a user perspective, it isn't a new entity, it is a converted entity
    285 $adb->pquery("UPDATE vtiger_crmentity newmod,(select createdtime, smcreatorid from vtiger_crmentity WHERE crmid=?) leadmod set newmod.createdtime=leadmod.createdtime,
    • Author Contributor

      yeah, fair point. The customer who wanted this (and convinced me it was a good idea) has now decided that they want to know both the lead created date and the conversion date as separate concepts.

  • Manu @manu.k started a thread on the diff
  • 280 280 $tableList = $meta->getEntityTableIndexList();
    281 281 $tableIndex = $tableList[$tablename];
    282 282 $adb->pquery("UPDATE $tablename SET isconvertedfromlead = ? WHERE $tableIndex = ?",array(1,$id));
    283 //copy forward the created time and creator of the lead to the converted objects
    284 //from a user perspective, it isn't a new entity, it is a converted entity
    285 $adb->pquery("UPDATE vtiger_crmentity newmod,(select createdtime, smcreatorid from vtiger_crmentity WHERE crmid=?) leadmod set newmod.createdtime=leadmod.createdtime,
    • @alanbell As the Lead conversion time period will be stored in the crmentity record of a lead under the modifiedtime column,You can use this value as the converted time and update it to the new custom column during lead conversion.

  • Maintainer

    Rejecting this merge request for now as it looked more like a custom need (see earlier conversations).

  • Prasad Status changed to closed

    Status changed to closed

  • Please register or sign in to reply
    Loading