<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div class="" style="">Hi,</div><div class="" style=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class="">I am newbie to Vtiger. I have a custom module with 3 fields. One of these fields is "related module" / uitype 10 and associated with Accounts module. The module is working fine.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue',
 Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class="">I have related this module to accounts using following code.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><br class="" style=""></div><div style="background-color: transparent;" class="">$MODULENAME = 'Accounts';</div><div style="background-color: transparent;" class=""><br class="" style=""></div><div style="background-color: transparent;" class="">$accModuleInstance = Vtiger_Module::getInstance($MODULENAME);</div><div style="background-color: transparent;" class="">if($accModuleInstance){</div><div style="background-color: transparent;" class="">    becho("Adding subscriptions to accounts");</div><div style="background-color: transparent;" class="">   
 $subsModuleInstance = Vtiger_Module::getInstance('Meters');</div><div style="background-color: transparent;" class="">    if($subsModuleInstance){</div><div style="background-color: transparent;" class="">        becho("Found subscriptions module");</div><div style="background-color: transparent;" class="">        $accModuleInstance->setRelatedList($subsModuleInstance,'Meters',false,'get_dependents_list');</div><div style="background-color: transparent;" class="">    }</div><div style="background-color: transparent;" class="">}</div><div style="background-color: transparent;" class=""><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class="">The related tabs in Account module lists Meters module. When clicked, the meters list is not
 populated. I have checked the query created by "get_dependents_list" method. The query returns records correctly when run directly on database.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class="">Thanks,</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;
 background-color: transparent;" class="">Sachin </div></div></body></html>