<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Omri, <div class="">you could follow two paths: the ugly one, in which you modify /modules/contacts/contacts.php adding your get_vulnorg_list there.</div><div class=""><br class=""></div><div class="">The more polite one in which you use a js file to make an ajax call to get your records to the file containing <span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">get_vulnorg_list.</span></div><div class=""><br class=""></div><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">I hope one of those solutions  suits your case.</span></font></div><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class=""><br class=""></span></font></div><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">Angelo</span></font></div><div class=""><div class="">
<div>_______________<br class=""><br class="">Angelo Paglialonga<br class="">Consulente per soluzioni CRM ad alto ROI.<br class=""><br class="">Telefono: 3386077866<br class="">Skype: angelo.paglialonga<br class="">Web: <a href="https://www.angelopaglialonga.com" class="">https://www.angelopaglialonga.com</a></div><div><br class=""></div><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">Il giorno 17 giu 2021, alle ore 20:56, omri yona <<a href="mailto:omri.yona@gmail.com" class="">omri.yona@gmail.com</a>> ha scritto:</div><br class="Apple-interchange-newline"><div class=""><div dir="auto" class=""><div dir="auto" class=""></div>Alan First thank you for your answer<div dir="auto" class="">But I think I didn't explain my self good, my problem is that I build a relation that similar to get_related_list using</div><div dir="auto" class="">using $contactsModule->setRelatedList($VulnOrgModule, "VulnOrg", "","get_vulnorg_list");</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">I can't use the basic get_related_list function because I saved the relation in different table because it doesn't want vtiger_crmentityrel table   to be too big</div><div dir="auto" class="">and this relation has a lot of relations (similar to emails).</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Thank you again for your help</div><div dir="auto" class=""><br class=""></div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">n Thu, Jun 17, 2021, 13:22 Alan Lord (News) [via vtiger CRM] <<a href="mailto:no-reply@nabble.com" target="_blank" rel="noreferrer" class="">no-reply@nabble.com</a>> wrote:<div dir="auto" class=""><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

        I presume you have created a UIType 10 field in your custom module for a 
<br class="">Contact reference?
<br class=""><br class="">e.g.:
<br class="">$module = Vtiger_Module::getInstance('vulOrg');
<br class="">$block = Vtiger_Block::getInstance('vulOrg Information', $module);
<br class=""><br class="">$field = Vtiger_Field::getInstance('contact_id', $module);
<br class="">if ($field != false) {
<br class="">     $field->unsetRelatedModules(array('Contacts'));
<br class="">     $field->delete();
<br class="">}
<br class="">$field = new Vtiger_Field();
<br class="">$field->name = 'contact_id';
<br class="">$field->label = 'Contact';
<br class="">$field->column = $field->name;
<br class="">$field->columntype = 'INT(11)';
<br class="">$field->uitype = 10;
<br class="">$field->typeofdata = 'V~O';
<br class="">$field->summaryfield = 1;
<br class="">$field->masseditable = 0;
<br class="">$block->addField($field);
<br class="">$field->setRelatedModules(array('Contacts'));
<br class=""><br class="">Then you _should_ be able to use the standard method to create the 
<br class="">relatedList in the Contact module. e.g.:
<br class=""><br class="">$contacts = Vtiger_Module::getInstance('Contacts');
<br class=""><br class="">$field = Vtiger_Field::getInstance('contact_id', $module);
<br class="">$contacts->unsetRelatedList($module, 'vulOrg', 'get_dependents_list');
<br class="">$contacts->setRelatedList($module, 'vulOrg', array('ADD'), 
<br class="">'get_dependents_list', $field->id);
<br class=""><br class="">Something like that should do it.
<br class=""><br class="">This was from memory so might need tweaking.
<br class=""><br class="">Al
<br class=""><br class="">On 17/06/2021 11:05, omri yona wrote:
<div class=""><br class="">> Hello all,
<br class="">> 
<br class="">> I try to do something without changing the vtiger core. Maybe you have 
<br class="">> any idea.
<br class="">> My case:
<br class="">> I have a custom module (module name: vulOrg)  with  a relations to the 
<br class="">> contacts module so now in the Contacts module I have a new tab to my 
<br class="">> custom module.
<br class="">> To support this tab I need to change the contacts core file 
<br class="">> (modules/Contacts/Contacts.php)
<br class="">> 1. set new function get_vulorg (like get_emails...) to find my relations 
<br class="">> record (can't use the     basic get_related_list or get_dependents_list 
<br class="">> function)
<br class="">> 2. add flow in unlinkRelationship function
<br class="">> 
<br class="">> I manage to do what I want by changing the core file, but I don't like 
<br class="">> core changes.
<br class="">> 
<br class="">> I would love to get any ideas on how to do it without changing the core.
<br class="">> 
<br class="">> Thank you for your help,
<br class="">> Omri
<br class="">> 
<br class="">> 
<br class="">> 
<br class="">> _______________________________________________
<br class="">> <a href="http://www.vtiger.com/" rel="nofollow noreferrer noreferrer" link="external" target="_blank" class="">http://www.vtiger.com/</a><br class="">> 
</div>_______________________________________________
<br class=""><a href="http://www.vtiger.com/" rel="nofollow noreferrer noreferrer" link="external" target="_blank" class="">http://www.vtiger.com/</a>

        
        
        
        <br class="">
        <br class="">
        <hr noshade="" size="1" class="">
        <div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif" class="">
                <a href="http://vtiger-crm.2324883.n4.nabble.com/Vtigercrm-developers-extends-Contacts-class-new-relations-tp24300p24301.html" rel="noreferrer noreferrer" target="_blank" class="">http://vtiger-crm.2324883.n4.nabble.com/Vtigercrm-developers-extends-Contacts-class-new-relations-tp24300p24301.html</a>
        </div>
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em" class="">
                To unsubscribe from vtiger CRM, <a href="http://vtiger-crm.2324883.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2&code=b21yaS55b25hQGdtYWlsLmNvbXwyfC0xODc1MjMxMzE5" rel="noreferrer noreferrer" target="_blank" class="">click here</a>.<br class="">
                <a href="http://vtiger-crm.2324883.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow noreferrer noreferrer" style="font:9px serif" target="_blank" class="">NAML</a>
        </div></blockquote></div></div></div></div>
_______________________________________________<br class=""><a href="http://www.vtiger.com/" class="">http://www.vtiger.com/</a></div></blockquote></div><br class=""></div></body></html>