[Vtigercrm-developers] Apply filters on Popup contents?

Sebastiaan Venema - Jansen Pro Office svenema at jansenprooffice.nl
Mon Oct 6 13:42:29 GMT 2014


Hello Alan,

Im trying to achieve pretty much the same thing. (Choose Asset from ticket, and only list related assets.)

The parameters: related_parent_module, related_parent_id
can be added to the popup url in edit.js around line 106.
Then when opening the pop-up the url has these parameter inbedded.
However the list is not filtered, back tracking the code i am currently at:

File: Popup.php
Function: initializeListViewContents

Line 94/95: The parameters are picked up.
Line 129 and 150, the relations get checked.

I am currently investigating how this works the file related tot this is:
File: RelationListView
Function: getInstance
Line 355

Greetings,
Sebastiaan





-----Oorspronkelijk bericht-----
Van: vtigercrm-developers-bounces at lists.vtigercrm.com [mailto:vtigercrm-developers-bounces at lists.vtigercrm.com] Namens Alan Lord
Verzonden: maandag 6 oktober 2014 14:06
Aan: vtigercrm-developers at lists.vtigercrm.com
Onderwerp: Re: [Vtigercrm-developers] Apply filters on Popup contents?

On 06/10/14 10:56, Alan Lord wrote:

> What's the correct way to do this now? I'm assuming I create an 
> override of layout/vlayout/modules/Vtiger/resources/Popup.js but I 
> don't think I need any special templates?

So a bit more digging and it isn't as straightforward as it might first seem...

1. I need to override the Popup.php view for the target module of the
UI10 field (in my case the Accounts module) to limit the initial List.

2. I then need to override the Popup.js for the target module of the
UI10 field to limit the page counting functions and any subsequent search functions a user might do in the Popup.

So this would mean creating the 2 override files (Popup.js and
Popup.php) in the Accounts module structure.

Perhaps then I should be looking at this a different way... Maybe I should be setting the search_key and search_value params in the URL that opens the Popup in the first place?

But I am not sure where I should be doing this... Override Edit.js perhaps?

Cheers

Al


_______________________________________________
http://www.vtiger.com/







More information about the vtigercrm-developers mailing list