[Vtigercrm-developers] VT6.1.0 Add custom related List function to standard module

Alan Lord alanslists at gmail.com
Mon Jan 12 12:50:27 GMT 2015


On 09/01/15 13:06, Alan Lord wrote:
>
> Question is where/how should I code my function getRelatedStuff() so I
> don't have to modify the Account.php file?
>

To answer my own question this is possible if you create a custom module 
to generate the data you want to show in the Related List area.

To use this you must declare a new View class in your custom module 
called "In$parentModuleRelation.php". In my case $parentModule = 'Accounts'.

Take a look at the function showRelatedList() in 
modules/Vtiger/views/Detail.php

This means you do not need to create a getRelatedStuff() function at all 
in the parent class. So in my example I have an entry in 
vtiger_relatedlists with no data in the "name" column. All the initial 
processing of the data is carried out in my View class [the data itself 
is being generated in a Model class].

Hope this helps someone.

Cheers

Al


> Cheers
>
> Al
>
> _______________________________________________
> http://www.vtiger.com/
>




More information about the vtigercrm-developers mailing list