[prev in list] [next in list] [prev in thread] [next in thread]
List: vtigercrm-developers
Subject: Re: [Vtigercrm-developers] Relate two custom modules
From: Nicolas Larcipretti <niclarcipretti () gmail ! com>
Date: 2011-09-12 13:44:01
Message-ID: CAK10WeDOBSKvm9Kt92oqSsx5CPgL70Xxkf-g41AeLMih-G-K4Q () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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@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/
>
[Attachment #5 (text/html)]
Hi Conrado,<br><br>Welcome!<br><br>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)<br><br>class Territory extends CRMEntity {<br> var $db, $log; // \
Used in class functions of CRMEntity<br><br> var $table_name = \
'vtiger_territory';<br> var $table_index= 'territoryid';<br> \
var $column_fields = Array();<br><br> /** Indicator if this is a custom module or \
standard module */<br> var $IsCustomModule = true;<br><br> /**<br> * \
Mandatory table for supporting custom fields.<br> */<br> var $customFieldTable \
= Array('vtiger_territorycf', 'territoryid');<br><br> \
/**<br>
* Mandatory for Saving, Include tables related to this module.<br> */<br> \
var $tab_name = Array('vtiger_crmentity', 'vtiger_territory', \
'vtiger_territorycf');<br><br> /**<br> * Mandatory for Saving, Include \
tablename and tablekey columnname here.<br>
*/<br> var $tab_name_index = Array(<br> 'vtiger_crmentity' \
=> 'crmid',<br> 'vtiger_territory' => \
'territoryid',<br> 'vtiger_territorycf' => \
'territoryid',<br> );<br><br> /**<br> * Mandatory for Listing \
(Related listview)<br> */<br> var $list_fields = Array (<br> /* Format: \
Field Label => Array(tablename, columnname) */<br> // tablename should not \
have prefix 'vtiger_'<br> 'LBL_NM_TERRITORIO'=> \
Array('territory', 'nm_territorio'),<br> \
'LBL_NM_TERRITORIO_PAI'=> Array('territory', \
'cd_territorio_pai')<br> );<br> var $list_fields_name = Array(<br> /* \
Format: Field Label => fieldname */<br> 'LBL_NM_TERRITORIO'=> \
'nm_territorio',<br> 'LBL_NM_TERRITORIO_PAI' => \
'cd_territorio_pai'<br> );<br><br> // Make the field link to detail \
view from list view (Fieldname)<br> var $list_link_field = \
'nm_territorio';<br><br> // For Popup listview and UI type support<br> \
var $search_fields = Array(<br> /* Format: Field Label => Array(tablename, \
columnname) */<br> // tablename should not have prefix 'vtiger_'<br> \
'LBL_NM_TERRITORIO'=> Array('territory', \
'nm_territorio'),<br> 'LBL_NM_TERRITORIO_PAI'=> \
Array('territory', 'cd_territorio_pai'),<br> \
'LBL_NM_TIPO_TERRITORIO'=> Array('territory', \
'nm_tipo_territorio'),<br> 'Assigned To'=> \
Array('crmentity', 'smownerid')<br> );<br> var \
$search_fields_name = Array(<br> /* Format: Field Label => fieldname */<br> \
'LBL_NM_TERRITORIO'=> 'nm_territorio',<br> \
'LBL_NM_TERRITORIO_PAI'=> 'cd_territorio_pai',<br> \
'LBL_NM_TIPO_TERRITORIO'=> 'nm_tipo_territorio',<br> \
'Assigned To'=> 'assigned_user_id'<br> );<br><br> // For Popup \
window record selection<br> var $popup_fields = \
Array('nm_territorio');<br><br> // Placeholder for sort fields - All the \
fields will be initialized for Sorting through initSortFields<br> var $sortby_fields \
= Array();<br><br> // For Alphabetical search<br> var $def_basicsearch_col = \
'nm_territorio';<br><br> // Column value to use on detail view record text \
display<br> var $def_detailview_recname = 'nm_territorio';<br> <br> // \
Required Information for enabling Import feature<br> var $required_fields = \
Array('nm_territorio'=>1);<br><br> // Callback function list during \
Importing<br> var $special_functions = \
Array('set_import_assigned_user');<br> <br> var $default_order_by = \
'cd_territorio';<br> var $default_sort_order='ASC';<br> // Used \
when enabling/disabling the mandatory fields for the module.<br> // Refers to \
vtiger_field.fieldname values.<br> var $mandatory_fields = \
Array('createdtime', 'modifiedtime', \
'nm_territorio');<br><br>Cheers<br><br>Nicolas.<br><br><br><br><div \
class="gmail_quote">2011/9/12 Conrado Maggi <span dir="ltr"><<a \
href="mailto:comaggi@gmail.com">comaggi@gmail.com</a>></span><br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex;"><u></u>
<div>
Hi,<br>
<br>
This is my first message to the list. Here Conrado form Argentina.<br>
<br>
I have created a couple of modules using vtlib. One of them includes two fields \
related to other modules (uitype = 10):<br> <br>
The field that is related to accounts, contacts, vendors I have no problems and In \
this case the popup works smoothly.<br> <br>
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<br>
<br>
I would really appreciate your help to make this works<br>
<br>
Thanks a lot!<br><font color="#888888">
<br>
Conrado
<br>
</font></div>
<br>_______________________________________________<br>
<a href="http://www.vtiger.com/" \
target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br>
_______________________________________________
http://www.vtiger.com/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic