doujiu3768 2013-09-12 04:40
浏览 182

如何在vtiger crm中向vtiger_activity添加新字段

I want to add new field to vtiger_activity table in vtiger crm. I added the column in the table but now I am not getting place from where the insert function is called, and also how to add this new field to the column list through php code.

thanks

  • 写回答

1条回答 默认 最新

  • doukang7858 2013-11-09 05:32
    关注

    You can add field from module setting-> Layout Editor-> Add Custom Filed Or if you want to add field by using code then here below is the code.

    <?php
    
    $Vtiger_Utils_Log = true;
    include_once('vtlib/Vtiger/Menu.php');
    include_once('vtlib/Vtiger/Module.php');
    //(module name without space)
    $module = new Vtiger_Module();
    $module->name = 'Modulename';
    $module = $module->getInstance('Modulename');
    
    // Create Block instance
    $block1 = new Vtiger_Block();
    $block1->label = 'Block Name';
    $block1 = $block1->getInstance($block1->label,$module);
    
    $field0 = new Vtiger_Field();
    $field0->name = 'field name';
    $field0->table = $module->basetable;
    $field0->label = 'Field Name to display';
    $field0->column = 'field name';
    $field0->columntype = 'VARCHAR(100)';
    $field0->uitype = 2;
    $field0->typeofdata = 'V~O';
    $block1->addField($field0);
    
    ?>
    
    评论

报告相同问题?

悬赏问题

  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本