[Vtigercrm-developers] vtlib & relatedListViews

Alan Lord alanslists at gmail.com
Mon Oct 8 04:05:07 PDT 2012



On 06/10/12 19:04, Prasad wrote:
> The fields to be shown on the related list is pre-determined (array in
> the module). You might need to initialize this based on the context
> before the RelatedListView gets generated.
>
> Give it a try...and share your feedback. It would be certainly an
> interesting design to learn from and then adapt.

Thanks Prasad, that was a very helpful pointer!

 From a quick test it looks like we can move the list_fields and 
list_fields_names array declarations inside the module's class 
constructor, e.g.

if ($currentModule == "Contacts") {
     $this->list_fields = Array (...

We can then test based on the $currentModule var and select different 
columns as we require.

Thanks for that

Alan






More information about the vtigercrm-developers mailing list