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

Prasad prasad at vtiger.com
Wed May 19 12:16:06 PDT 2010


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20100520/7aa09134/attachment-0002.html 


More information about the vtigercrm-developers mailing list