[Vtigercrm-developers] Two and more Related list to the same module

Trifon Trifonov trifon.trifonov at catura.de
Wed May 19 13:22:50 PDT 2010


Hi Prasad,

thank you for your response!

I know about this custom functions and i think that they are way.
Question which popup is that i need to distinguish which records to
show from the relationship between Project and Contacts.
A filter by which to filter records.

vTiger has table "vtiger_crmentityre" which show relationship between records.
			47	Project	17	Contacts
			47	Project	18	Contacts
			47	Project	27	Contacts
			47	Project	28	Contacts
What i need is another column in "vtiger_crmentityre" to distinguish
relation type/name.
Currently i can see that record with ID 47 from Project module is
related to Record with ID 18 and 17,18,27,18 from Contacts module but
i can't find which is the relation type(contacts 17 and 18 belongs to
"Major" relation type while contacts 27 and 28 to "Minor").

Second approach i think is to add new table vtiger_projectcontactrel
to hold information about relationship between Project and Contact.
Here of course i can add column to hold type of the relation.

What do you think is there another more easy approach in vTiger which
i do not know?
Should vTiger team accept such general change in the core?
What are the requirements to be included in the next version of vTiger?

As a background information in ADempiere we have similar GUI
Structure: Window with multiple tabs. Window from ADempiere is like
Module in vTiger. Tab from ADempiere is like CRMEntity from vTiger.
When defining Tabs in ADempiere i can specify WHERE clause by which to
filter relation records. This allows me to have many embedded tabs
showing information from the same relationship table but filtered by
specific criteria.
I;m writing this as it might help in the search for solution.

Kind regards,
Trifon
---
www.catura.de

On Wed, May 19, 2010 at 9:16 PM, Prasad <prasad at vtiger.com> wrote:
> Hi,
>
> setRelatedList API takes one more parameter function_name,
> by default it is set to get_relatedlists (implemented in CRMEntity.php)
>
> You will need to implement custom version of it in your class and
> provide the name when setting up related list.
>
> Regards,
> Prasad
>
> On 5/19/10, Trifon Trifonov <trifon.trifonov at catura.de> wrote:
>>
>> Hello Developers,
>>
>> On vTiger 5.1.0 with vTlib i know how to define relation between modules:
>>
>> include_once('vtlib/Vtiger/Menu.php');
>> include_once('vtlib/Vtiger/Module.php');
>>
>> // Relate Project module with Accounts
>> $module = Vtiger_Module::getInstance('Project');
>> $module->setRelatedList(Vtiger_Module::getInstance('Accounts'),
>> 'Accounts', Array('ADD','SELECT'));
>>
>> Above code is working very well. It shows All Accounts related to
>> specific Project.
>>
>> I'm trying to add second relation(let's name it Fathers) but
>> unfortunately it shows again the same records as the first(Accounts).
>> $module->setRelatedList(Vtiger_Module::getInstance('Contacts'),
>> 'Fathers', Array('ADD','SELECT'));
>>
>> Can you please advice if this is possible?
>> In case not i would like to add such capabilities to vTiger. Would
>> appreciate comments in what direction to look in order to develop it.
>>
>> Regards,
>> Trifon
>> ----
>> www.catura.de
>> _______________________________________________
>> Reach hundreds of potential candidates - http://jobs.vtiger.com
>
>
> _______________________________________________
> Reach hundreds of potential candidates - http://jobs.vtiger.com
>



More information about the vtigercrm-developers mailing list