php - Vtiger Activity module to be added to custom Module -


http://community.vtiger.com/help/vtigercrm/developers/extensions/examples/entity-module.html

using documentation given on above link, created custom module named leaves. now, next task add activity module leaves module. used following code accomplish same.

include_once('vtlib/vtiger/module.php'); $moduleinstance = vtiger_module::getinstance('leaves'); $accountsmodule = vtiger_module::getinstance('calendar'); $relationlabel  = 'activities'; $moduleinstance->setrelatedlist(       $accountsmodule, $relationlabel, array('add','select'), 'get_activities' ); 

now, in module/leaves/leaves.php copied get_activities function accounts.php module of accounts module. should have worked did not.

i added single leave , opened it's detail view. became happy seeing activities label there. clicked on , added 2 events particular single leave. ideally, events i.e 2 events added must listed there there no event.

i checked codes , found out relation being stored in 'vtiger_seactivityrel' table activityid , single leave id(crmid). when add event leaves module. activity created relation not stored in 'vtiger_seactivityrel'. made relation manually adding activityid , crmid started showing events.

hence, question being raised here why 'vtiger_seactivityrel' table not populated.

please me if have solution.i have attached image of 1 such leave showing blank after adding event.

after lot of research found out needed update vtiger_ws_referencetype table making relation. here query same. in case custommodulename replaced leaves.

insert vtiger_ws_referencetype(fieldtypeid,type) values (34,'custommodulename'); 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -