[Vtigercrm-developers] Enable history view for modules

PlaymaN Tepes sshhocckk at gmail.com
Tue Sep 23 07:26:02 GMT 2014


Wow,

Thanks for this, worked 100%!

2014-09-15 15:01 GMT+02:00 lajeesh k <lajeeshk at gmail.com>:

> 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/
>>
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20140923/ff411ef7/attachment.html>


More information about the vtigercrm-developers mailing list