[Vtigercrm-developers] Enable history view for modules

lajeesh k lajeeshk at gmail.com
Mon Sep 15 13:01:27 GMT 2014


Thanks for your time Alan,

I am adding some of my findings too to this thread. It may be help someone
else

I have seen a function in ModTracker.php file which will do all this magic

static function enableTrackingForModule($tabid){
global $adb;
if(!self::isModulePresent($tabid)){
$res=$adb->pquery("INSERT INTO vtiger_modtracker_tabs
VALUES(?,?)",array($tabid,1));
self::updateCache($tabid,1);
} else{
$updatevisibility = $adb->pquery("UPDATE vtiger_modtracker_tabs SET visible
= 1 WHERE tabid = ?", array($tabid));
self::updateCache($tabid,1);
}
if(!self::isModTrackerLinkPresent($tabid)){
$moduleInstance=Vtiger_Module::getInstance($tabid);
$moduleInstance->addLink('DETAILVIEWBASIC', 'View History',
"javascript:ModTrackerCommon.showhistory('\$RECORD\$')",'','',
array('path'=>'modules/ModTracker/ModTracker.php','class'=>'ModTracker','method'=>'isViewPermitted'));
}
}



Regards,
Lajeesh

On Mon, Sep 15, 2014 at 5:49 PM, Alan Lord <alanslists at gmail.com> wrote:

> On 15/09/14 12:43, lajeesh k wrote:
>
>> Hi,
>>
>> How can we enable history view or recent update for a module . Is there
>> any such option available via front end ?
>>
>
> Using the vtlib API you need to add the ModTracker showhistory action link
> link to your module and also add the tabid of your module to
> vtiger_modtracker_tabs.
>
> HTH
>
> Al
>
>
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20140915/c286813f/attachment.html>


More information about the vtigercrm-developers mailing list