| Server IP : 138.197.176.125 / Your IP : 216.73.217.122 Web Server : Apache/2.4.41 (Ubuntu) System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/vtigergoogleoffice365suite65phase2qa/ |
Upload File : |
<?php
$Vtiger_Utils_Log = true;
include_once('vtlib/Vtiger/Menu.php');
include_once('vtlib/Vtiger/Module.php');
//create objact and mention module place ex:Sales
$module = new Vtiger_Module();
$module->name = 'CTGoogleSuite';
$module->parent = 'Sales';
$module->save();
//start creating table
$module->initTables();
$module->initWebservice();
$block1 = new Vtiger_Block();
$block1->label = 'CTGoogleSuite Information';
$module->addBlock($block1);
$field1 = new Vtiger_Field();
$field1->name = 'ctgoogleSuite_no'; //Input Field name
$field1->label = 'CTGoogleSuite No'; //Input Label
$field1->table = $module->basetable; //Table Name
$field1->column = 'ctgoogleSuite_no';
$field1->columntype = 'VARCHAR(255)';
$field1->uitype = 4;
$field1->typeofdata = 'V~O';
$module->setEntityIdentifier($field1);
$block1->addField($field1); //to add field in block
$field2 = new Vtiger_Field();
$field2->name = 'createdtime';
$field2->label = 'Created Time';
$field2->table = 'vtiger_crmentity';
$field2->column = 'createdtime';
$field2->columntype = 'datetime';
$field2->uitype = 70;
$field2->displaytype = 2;
$field2->typeofdata = 'DT~O';
$block1->addField($field2);
$field3 = new Vtiger_Field();
$field3->name = 'modifiedtime';
$field3->label = 'Modified Time';
$field3->table = 'vtiger_crmentity';
$field3->column = 'modifiedtime';
$field3->columntype = 'datetime';
$field3->uitype = 70;
$field3->displaytype = 2;
$field3->typeofdata = 'DT~O';
$block1->addField($field3);
$field4 = new Vtiger_Field();
$field4->name = 'assigned_user_id';
$field4->label = 'Assigned To';
$field4->table = 'vtiger_crmentity';
$field4->column = 'smownerid';
$field4->columntype = 'int(19)';
$field4->uitype = 53;
$field4->typeofdata = 'V~M';
$block1->addField($field4);
$filter1 = new Vtiger_Filter();
$filter1->name = 'All';
$filter1->isdefault = true;
$module->addFilter($filter1);
// Add fields to the filter created
$filter1->addField($field1, 1);
$filter1->addField($field2, 2);
$filter1->addField($field3, 3);
/* Set sharing access of this module */
$module->setDefaultSharing('Private');
// Enable and Disable available tools
$module->enableTools(Array('Import', 'Export'));
$module->disableTools('Merge');
?>