如何在vtiger crm中的vtiger_activity中添加新字段 [英] how to add new field to vtiger_activity in vtiger crm

查看:151
本文介绍了如何在vtiger crm中的vtiger_activity中添加新字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在vtiger crm中的vtiger_activity表中添加新字段.我在表中添加了该列,但是现在我无法从插入函数的调用位置以及如何通过php代码将该新字段添加到列列表中来.

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.

谢谢

推荐答案

您可以从模块设置->布局编辑器->添加自定义字段中添加字段,或者如果您想通过使用代码添加字段,则下面是代码.

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);

?>

这篇关于如何在vtiger crm中的vtiger_activity中添加新字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆