[Vtigercrm-developers] add/remove relatedlist entry trigger eventhandler

Mariusz Krzaczkowski m.krzaczkowski at yetiforce.com
Tue Jun 2 07:01:07 GMT 2015


 

Hi Alan, 

Although 'Mod Tracker' is a module, it has some scripts built-in in
order to work properly. If someone wants to add a similar module, he
would have to add scripts, e.g. here: 

in file data\CRMEntity.php in function trackLinkedInfo and
trackUnLinkedInfo 

> // @Note: We should extend this to event handlers
> if(vtlib_isModuleActive('ModTracker')) {
> // Track the time the relation was added
> require_once 'modules/ModTracker/ModTracker.php';
> ModTracker::linkRelation($module, $crmid, $with_module, $with_crmid);
> }

> // @Note: We should extend this to event handlers
> if(vtlib_isModuleActive('ModTracker')) {
> //Track the time the relation was deleted
> require_once 'modules/ModTracker/ModTracker.php';
> ModTracker::unLinkRelation($module, $crmid, $with_module, $with_crmid);
> }

We solved it at the same time when we improved the handlers, you can see
an example of the solution here:
https://github.com/YetiForceCompany/YetiForceCRM/commit/58e930bba74f1f1fe5778dc1780dd1090a469914
[2] this solution could be implemented to Vtiger 6.3. 
---

Z poważaniem / Regards 

MARIUSZ KRZACZKOWSKI 
_Director of Product Development_ 
M: +48 884-998-123
E: m.krzaczkowski at yetiforce.com 
-------------------------

We created an innovative open source project called YetiForceCRM. You
can test it here [3], download [4] it for free or read its documentation
[5]. Follow us on Twitter [6] to get real-time info about new
functionalities and articles. 

W dniu 2015-05-22 07:17, Alan Lord napisał(a): 

> On 21/⁠05/⁠15 19:52, Mariusz Krzaczkowski wrote: 
> 
>> Hi all,
>> What you need it is very easy to do this, just add a simple trigger
>> handler, here's an example:
> 
> That's a great help -⁠ thanks Mariusz.
> 
> But what I don't get is how Mod Tracker is picking up this event without your modifications?
> 
> Alan
> 
> _______________________________________________
> http://www.vtiger.com/ [1]
 

Links:
------
[1] http://www.vtiger.com/
[2]
https://github.com/YetiForceCompany/YetiForceCRM/commit/58e930bba74f1f1fe5778dc1780dd1090a469914
[3] https://test.yetiforce.com/
[4] https://github.com/YetiForceCompany/YetiForceCRM
[5] https://yetiforce.com/en/documentation.html
[6] https://twitter.com/YetiForceEN
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150602/dde12f05/attachment.html>


More information about the vtigercrm-developers mailing list