The setRelatedList API is extremely important for us who need to adapt Vtiger to specials requirements.<br><br>One question I still have is : is it possible to pre-filter the records in the windows that pops-up when I click Add on a related list ?<br>

<br>Exemple : I have a module Payslip. I want it to be related to the module Account so I can select Accounts to add to the More information tab of a specific Payslip.<br><br>I use the setRelatedList API as described in VtigerCRM_5.1.0_Vtlib.pdf and it works perfectly.<br>

<br>Now suppose that I want to show only a subset of the Accounts when I click on the Add button in the related list. For example I want to display only accounts from a specific city.<br><br>Is there already a way to do that ?<br>

<br>If not, would it be possible to add an other argument to the setRelatedList API ?<br><br>Vtiger_Module-&gt;setRelatedList(&lt;TARGET MODULE&gt;[, &lt;HEADER LABEL&gt;, &lt;ALLOWED ACTIONS&gt;, &lt;CALLBACK FUNCTION NAME&gt;, &lt;FILTER FUNCTION NAME&gt;]);<br>

<br>&lt;FILTER FUNCTION NAME&gt;<br>Optional (default = everything)<br>The function should be defined in the &lt;SOURCE MODULE&gt; class.<br>This should filter the records in the &lt;TARGET MODULE&gt; popup before displaying.<br>

<br><br clear="all">David V.<br>