<div dir="ltr"><div><font face="arial, sans-serif">ModuleModel->getRelations() is primarily </font><font face="arial, sans-serif">targeting</font><font face="arial, sans-serif"> the related list that is shown on the detail view.</font><br></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">From the API from we need to merge both (1:n & n:n relationships).</font></div><div>This has been on my list for long time now. Glad you are progressing.</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><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/index.php/Main_Page" style="color:rgb(0,0,204)" target="_blank">Wiki</a> <b>I </b><a href="https://discussions.vtiger.com" style="color:rgb(0,0,204)" target="_blank">Forums </a><b>I</b> <a href="https://www.vtiger.com/" style="color:rgb(0,0,204)" target="_blank">Website</a></span></div>
<br><div class="gmail_quote">On Fri, Oct 10, 2014 at 6:43 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">I'm investigating building a new module and would like to be able to retrieve all the relationships from one module to others:<br>
<br>
I found the getAllRelations() function which I can call from the ModuleModel->getRelations() but it only seems to show the related lists (1:n & n:n relationships) and not the UI10 relationships in this module. (See below for the model returned for the Contacts module and note that the Account relationship is missing).<br>
<br>
Is there a way to get *all* the relationships in a single function or will I have to write one?<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Array<br>
(<br>
    [0] => Vtiger_Relation_Model Object<br>
        (<br>
            [parentModule:protected] => Contacts_Module_Model Object<br>
                (<br>
                    [blocks:protected] =><br>
                    [nameFields:protected] =><br>
                    [moduleMeta:protected] =><br>
                    [fields:protected] =><br>
                    [relations:protected] =><br>
                    [id] => 4<br>
                    [name] => Contacts<br>
                    [label] => Contacts<br>
                    [version] =><br>
                    [minversion] =><br>
                    [maxversion] =><br>
                    [presence] => 0<br>
                    [ownedby] => 0<br>
                    [tabsequence] => 4<br>
                    [parent] => Sales<br>
                    [customized] => 0<br>
                    [trial] => 0<br>
                    [isentitytype] => 1<br>
                    [entityidcolumn] =><br>
                    [entityidfield] =><br>
                    [basetable] => vtiger_contactdetails<br>
                    [basetableid] => contactid<br>
                    [customtable] =><br>
                    [grouptable] =><br>
                )<br>
<br>
            [relatedModule:protected] =><br>
            [relationType:protected] =><br>
            [valueMap:protected] => Array<br>
                (<br>
                    [0] => 19<br>
                    [relation_id] => 19<br>
                    [1] => 4<br>
                    [tabid] => 4<br>
                    [2] => 9<br>
                    [related_tabid] => 9<br>
                    [3] => get_activities<br>
                    [name] => get_activities<br>
                    [4] => 2<br>
                    [sequence] => 2<br>
                    [5] => Activities<br>
                    [label] => Activities<br>
                    [6] => 0<br>
                    [presence] => 0<br>
                    [7] => add<br>
                    [actions] => add<br>
                    [8] => Calendar<br>
                    [modulename] => Calendar<br>
                    [relatedModuleName] => Calendar<br>
                )<br>
<br>
        )<br>
<br>
    [1] => Vtiger_Relation_Model Object<br>
        (<br>
            [parentModule:protected] => Contacts_Module_Model Object<br>
                (<br>
                    [blocks:protected] =><br>
                    [nameFields:protected] =><br>
                    [moduleMeta:protected] =><br>
                    [fields:protected] =><br>
                    [relations:protected] =><br>
                    [id] => 4<br>
                    [name] => Contacts<br>
                    [label] => Contacts<br>
                    [version] =><br>
                    [minversion] =><br>
                    [maxversion] =><br>
                    [presence] => 0<br>
                    [ownedby] => 0<br>
                    [tabsequence] => 4<br>
                    [parent] => Sales<br>
                    [customized] => 0<br>
                    [trial] => 0<br>
                    [isentitytype] => 1<br>
                    [entityidcolumn] =><br>
                    [entityidfield] =><br>
                    [basetable] => vtiger_contactdetails<br>
                    [basetableid] => contactid<br>
                    [customtable] =><br>
                    [grouptable] =><br>
                )<br>
<br>
            [relatedModule:protected] =><br>
            [relationType:protected] =><br>
            [valueMap:protected] => Array<br>
                (<br>
                    [0] => 20<br>
                    [relation_id] => 20<br>
                    [1] => 4<br>
                    [tabid] => 4<br>
                    [2] => 10<br>
                    [related_tabid] => 10<br>
                    [3] => get_emails<br>
                    [name] => get_emails<br>
                    [4] => 3<br>
                    [sequence] => 3<br>
                    [5] => Emails<br>
                    [label] => Emails<br>
                    [6] => 0<br>
                    [presence] => 0<br>
                    [7] => add<br>
                    [actions] => add<br>
                    [8] => Emails<br>
                    [modulename] => Emails<br>
                    [relatedModuleName] => Emails<br>
                )<br>
<br>
        )<br>
<br>
    [2] => Vtiger_Relation_Model Object<br>
        (<br>
            [parentModule:protected] => Contacts_Module_Model Object<br>
                (<br>
                    [blocks:protected] =><br>
                    [nameFields:protected] =><br>
                    [moduleMeta:protected] =><br>
                    [fields:protected] =><br>
                    [relations:protected] =><br>
                    [id] => 4<br>
                    [name] => Contacts<br>
                    [label] => Contacts<br>
                    [version] =><br>
                    [minversion] =><br>
                    [maxversion] =><br>
                    [presence] => 0<br>
                    [ownedby] => 0<br>
                    [tabsequence] => 4<br>
                    [parent] => Sales<br>
                    [customized] => 0<br>
                    [trial] => 0<br>
                    [isentitytype] => 1<br>
                    [entityidcolumn] =><br>
                    [entityidfield] =><br>
                    [basetable] => vtiger_contactdetails<br>
                    [basetableid] => contactid<br>
                    [customtable] =><br>
                    [grouptable] =><br>
                )<br>
<br>
            [relatedModule:protected] =><br>
            [relationType:protected] =><br>
            [valueMap:protected] => Array<br>
                (<br>
                    [0] => 27<br>
                    [relation_id] => 27<br>
                    [1] => 4<br>
                    [tabid] => 4<br>
                    [2] => 8<br>
                    [related_tabid] => 8<br>
                    [3] => get_attachments<br>
                    [name] => get_attachments<br>
                    [4] => 10<br>
                    [sequence] => 10<br>
                    [5] => Documents<br>
                    [label] => Documents<br>
                    [6] => 0<br>
                    [presence] => 0<br>
                    [7] => add,select<br>
                    [actions] => add,select<br>
                    [8] => Documents<br>
                    [modulename] => Documents<br>
                    [relatedModuleName] => Documents<br>
                )<br>
<br>
        )<br>
<br>
    [3] => Vtiger_Relation_Model Object<br>
        (<br>
            [parentModule:protected] => Contacts_Module_Model Object<br>
                (<br>
                    [blocks:protected] =><br>
                    [nameFields:protected] =><br>
                    [moduleMeta:protected] =><br>
                    [fields:protected] =><br>
                    [relations:protected] =><br>
                    [id] => 4<br>
                    [name] => Contacts<br>
                    [label] => Contacts<br>
                    [version] =><br>
                    [minversion] =><br>
                    [maxversion] =><br>
                    [presence] => 0<br>
                    [ownedby] => 0<br>
                    [tabsequence] => 4<br>
                    [parent] => Sales<br>
                    [customized] => 0<br>
                    [trial] => 0<br>
                    [isentitytype] => 1<br>
                    [entityidcolumn] =><br>
                    [entityidfield] =><br>
                    [basetable] => vtiger_contactdetails<br>
                    [basetableid] => contactid<br>
                    [customtable] =><br>
                    [grouptable] =><br>
                )<br>
<br>
            [relatedModule:protected] =><br>
            [relationType:protected] =><br>
            [valueMap:protected] => Array<br>
                (<br>
                    [0] => 155<br>
                    [relation_id] => 155<br>
                    [1] => 4<br>
                    [tabid] => 4<br>
                    [2] => 50<br>
                    [related_tabid] => 50<br>
                    [3] => get_dependents_list<br>
                    [name] => get_dependents_list<br>
                    [4] => 17<br>
                    [sequence] => 17<br>
                    [5] => Tour Families<br>
                    [label] => Tour Families<br>
                    [6] => 0<br>
                    [presence] => 0<br>
                    [7] => ADD<br>
                    [actions] => ADD<br>
                    [8] => LSTourFamilies<br>
                    [modulename] => LSTourFamilies<br>
                    [relatedModuleName] => LSTourFamilies<br>
                )<br>
<br>
        )<br>
<br>
    [4] => Vtiger_Relation_Model Object<br>
        (<br>
            [parentModule:protected] => Contacts_Module_Model Object<br>
                (<br>
                    [blocks:protected] =><br>
                    [nameFields:protected] =><br>
                    [moduleMeta:protected] =><br>
                    [fields:protected] =><br>
                    [relations:protected] =><br>
                    [id] => 4<br>
                    [name] => Contacts<br>
                    [label] => Contacts<br>
                    [version] =><br>
                    [minversion] =><br>
                    [maxversion] =><br>
                    [presence] => 0<br>
                    [ownedby] => 0<br>
                    [tabsequence] => 4<br>
                    [parent] => Sales<br>
                    [customized] => 0<br>
                    [trial] => 0<br>
                    [isentitytype] => 1<br>
                    [entityidcolumn] =><br>
                    [entityidfield] =><br>
                    [basetable] => vtiger_contactdetails<br>
                    [basetableid] => contactid<br>
                    [customtable] =><br>
                    [grouptable] =><br>
                )<br>
<br>
            [relatedModule:protected] =><br>
            [relationType:protected] =><br>
            [valueMap:protected] => Array<br>
                (<br>
                    [0] => 156<br>
                    [relation_id] => 156<br>
                    [1] => 4<br>
                    [tabid] => 4<br>
                    [2] => 51<br>
                    [related_tabid] => 51<br>
                    [3] => get_dependents_list<br>
                    [name] => get_dependents_list<br>
                    [4] => 18<br>
                    [sequence] => 18<br>
                    [5] => Tour Details<br>
                    [label] => Tour Details<br>
                    [6] => 0<br>
                    [presence] => 0<br>
                    [7] => ADD<br>
                    [actions] => ADD<br>
                    [8] => LSTourDetails<br>
                    [modulename] => LSTourDetails<br>
                    [relatedModuleName] => LSTourDetails<br>
                )<br>
<br>
        )<br>
<br>
)<br>
</blockquote>
<br>
<br>
______________________________<u></u>_________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div><br></div>