[Vtigercrm-developers] Relate two custom modules
Nicolas Larcipretti
niclarcipretti at gmail.com
Mon Sep 12 06:44:01 PDT 2011
Hi Conrado,
Welcome!
If I were you, I'd take a better look at the Bank.php file. Does it's first
lines looks like this? (Territory is the module's name)
class Territory extends CRMEntity {
var $db, $log; // Used in class functions of CRMEntity
var $table_name = 'vtiger_territory';
var $table_index= 'territoryid';
var $column_fields = Array();
/** Indicator if this is a custom module or standard module */
var $IsCustomModule = true;
/**
* Mandatory table for supporting custom fields.
*/
var $customFieldTable = Array('vtiger_territorycf', 'territoryid');
/**
* Mandatory for Saving, Include tables related to this module.
*/
var $tab_name = Array('vtiger_crmentity', 'vtiger_territory',
'vtiger_territorycf');
/**
* Mandatory for Saving, Include tablename and tablekey columnname here.
*/
var $tab_name_index = Array(
'vtiger_crmentity' => 'crmid',
'vtiger_territory' => 'territoryid',
'vtiger_territorycf' => 'territoryid',
);
/**
* Mandatory for Listing (Related listview)
*/
var $list_fields = Array (
/* Format: Field Label => Array(tablename, columnname) */
// tablename should not have prefix 'vtiger_'
'LBL_NM_TERRITORIO'=> Array('territory', 'nm_territorio'),
'LBL_NM_TERRITORIO_PAI'=> Array('territory', 'cd_territorio_pai')
);
var $list_fields_name = Array(
/* Format: Field Label => fieldname */
'LBL_NM_TERRITORIO'=> 'nm_territorio',
'LBL_NM_TERRITORIO_PAI' => 'cd_territorio_pai'
);
// Make the field link to detail view from list view (Fieldname)
var $list_link_field = 'nm_territorio';
// For Popup listview and UI type support
var $search_fields = Array(
/* Format: Field Label => Array(tablename, columnname) */
// tablename should not have prefix 'vtiger_'
'LBL_NM_TERRITORIO'=> Array('territory', 'nm_territorio'),
'LBL_NM_TERRITORIO_PAI'=> Array('territory', 'cd_territorio_pai'),
'LBL_NM_TIPO_TERRITORIO'=> Array('territory', 'nm_tipo_territorio'),
'Assigned To'=> Array('crmentity', 'smownerid')
);
var $search_fields_name = Array(
/* Format: Field Label => fieldname */
'LBL_NM_TERRITORIO'=> 'nm_territorio',
'LBL_NM_TERRITORIO_PAI'=> 'cd_territorio_pai',
'LBL_NM_TIPO_TERRITORIO'=> 'nm_tipo_territorio',
'Assigned To'=> 'assigned_user_id'
);
// For Popup window record selection
var $popup_fields = Array('nm_territorio');
// Placeholder for sort fields - All the fields will be initialized for
Sorting through initSortFields
var $sortby_fields = Array();
// For Alphabetical search
var $def_basicsearch_col = 'nm_territorio';
// Column value to use on detail view record text display
var $def_detailview_recname = 'nm_territorio';
// Required Information for enabling Import feature
var $required_fields = Array('nm_territorio'=>1);
// Callback function list during Importing
var $special_functions = Array('set_import_assigned_user');
var $default_order_by = 'cd_territorio';
var $default_sort_order='ASC';
// Used when enabling/disabling the mandatory fields for the module.
// Refers to vtiger_field.fieldname values.
var $mandatory_fields = Array('createdtime', 'modifiedtime',
'nm_territorio');
Cheers
Nicolas.
2011/9/12 Conrado Maggi <comaggi at gmail.com>
> **
> Hi,
>
> This is my first message to the list. Here Conrado form Argentina.
>
> I have created a couple of modules using vtlib. One of them includes two
> fields related to other modules (uitype = 10):
>
> The field that is related to accounts, contacts, vendors I have no problems
> and In this case the popup works smoothly.
>
> But I created a second field related to a custom module called "Banks"
> when I open the popup is completely blank. Reading the forum I found a
> similar problem so I incorporated the variable $ var popup_fields = Array
> ('bancosname'); in bancos.php yet still the displayed popup is blank
>
> I would really appreciate your help to make this works
>
> Thanks a lot!
>
> Conrado
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20110912/36fc70fc/attachment-0002.html
More information about the vtigercrm-developers
mailing list