<div dir="ltr"><div>I would like to understand a little more in details.</div><div><br></div><div>Consider working with a Contact and you want to add Products (n:n) - can you suggest your enhancement related to this?</div><div><br></div><div>Regards,</div><div>Prasad </div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><b>Connect with us on: </b><a href="http://twitter.com/vtigercrm" style="color:rgb(0,0,204)" target="_blank">Twitter</a> <b>I</b> <a href="http://www.facebook.com/pages/vtiger/226866697333578?sk=wall" style="color:rgb(0,0,204)" target="_blank">Facebook</a> <b>I</b> <a href="https://blogs.vtiger.com/" style="color:rgb(0,0,204)" target="_blank">Blog</a><b> I</b> <a href="http://wiki.vtiger.com/vtiger6/index.php/Main_Page" style="color:rgb(0,0,204)" target="_blank">Wiki</a> <b>I</b> <a href="https://www.vtiger.com/" style="color:rgb(0,0,204)" target="_blank">Website</a></span></div></div>
<br><div class="gmail_quote">On Fri, Oct 17, 2014 at 4:52 PM, Alan Lord <span dir="ltr"><<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We are frequently asked to do this and it would be better if we could achieve it without core hacks.<br>
<br>
For 1:n (get_dependents_list) relationships when selecting related records to add to a module, it is fairly easy. I have already suggested two very minor code additions to Popup.tpl[1] that would enable us to set the search_key and search_value in the request which would then automatically set the picklist and search box, thereby filtering the list displayed... (This is especially important now we can reliably have multiple UI10s to the same module)<br>
<br>
For a n:n (get_related_list) however it's a bit more complicated. I would like there to be some modification to the core Popup.php view and RelationListView model so we could pass a module name and a crmid to allow filtering of the list displayed in the popup. (Could probably use the exiting related_parent_module & related_parent_id params).<br>
<br>
For custom modules obviously we can override these classes if we need to, but if we create a n:n to a standard vtiger module and want to limit the result displayed in the Popup it gets rather tricky to say the least...<br>
<br>
Thoughts? Comments?<br>
<br>
Cheers<br>
<br>
Al<br>
<br>
[1]<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Add a test for SEARCH_VALUE and populate the search box<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<input class="span2" type="text" placeholder="{vtranslate('LBL_<u></u>TYPE_SEARCH')}" {if $SEARCH_VALUE} value="{$SEARCH_VALUE}" {/if} id="searchvalue"/>&nbsp;&nbsp;<br>
</blockquote></blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Add a test for SEARCH_KEY and select the right fieldname in the Select:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<option value="{$fieldName}" {if $fieldName eq $defaultSearchField} selected {/if}{if $fieldName eq $SEARCH_KEY} selected {/if}>{vtranslate($<u></u>fieldObject->get('label'),$<u></u>MODULE)}</option><br>
</blockquote></blockquote>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div><br></div>