[Vtigercrm-developers] How to get data from Invoices module from within my module
Lennart van Ballegoij
lennart at egmmedia.nl
Wed Dec 9 00:32:24 GMT 2015
Hey guys,
I've chosen to use a Event Handler like Alan suggested, this seemed the
best option for me.
This might be a pretty dumb question but i can't seem to figure out how to
print,echo or log the data i get after the entity save.
I only want to see the data for now for development purposes.
My Event Handler so far:
<?php
class ReeleezeeHandler extends VTEventHandler {
function handleEvent($eventName, $data) {
if($eventName == 'vtiger.entity.aftersave') {
if ($data->isNew()) {
// Create of new record
print_r($data);
} else {
// Edit of older record
}
}
}
}
?>
Can someone maybe give me push in the right direction?
Thanks in advance!!
Lennart
2015-12-08 20:27 GMT+01:00 Lennart van Ballegoij <lennart at egmmedia.nl>:
> Hey guys,
>
> Thanks for all the tips, i'm going to dive into this tomorrow.
>
> 2015-12-08 8:53 GMT+01:00 Alan Lord <alanslists at gmail.com>:
>
>> On 07/12/15 21:37, Richard Hills - Technologywise wrote:
>>
>>> Workflows should be a good fit for your requirements? Just create a
>>> custom workflow function and have your workflow run on every save to an
>>> invoice.
>>>
>>
>> Or an Event Handler could be used too.
>>
>> Al
>>
>>
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20151209/37c2e25a/attachment.html>
More information about the vtigercrm-developers
mailing list