[Vtigercrm-commits] [vtiger development] #7508: create parentid field in Documents module

vtiger development vtiger-tickets at trac.vtiger.com
Mon Sep 24 14:11:09 PDT 2012


#7508: create parentid field in Documents module
-----------------------+----------------------------------------------------
 Reporter:  heinz      |        Owner:  developer
     Type:  patch      |       Status:  new      
 Priority:  major      |    Milestone:  6.0.0    
Component:  vtigercrm  |      Version:  5.2.1    
 Severity:  Medium     |   Resolution:           
 Keywords:             |  
-----------------------+----------------------------------------------------
Comment (by heinz):

 This script creates the field and relates it to a couple of modules; more
 may be desired.

 $documents = Vtiger_Module::getInstance("Documents");
 $block = Vtiger_Block::getInstance("LBL_NOTE_INFORMATION", $documents);
 $field = new Vtiger_Field();
 $field->label = 'Parent';
 $field->name = 'parentid';
 $field->table = 'vtiger_senotesrel';
 $field->column = 'crmid';
 $field->uitype = UITypes::RELATED_ENTITY;
 $field->typeofdata = 'I~O';
 $field->save($block);
 $field->setRelatedModules(array('Contacts', 'Quotes'));

-- 
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7508#comment:1>
vtiger development <http://trac.vtiger.com/>
vtiger CRM



More information about the vtigercrm-commits mailing list