<div dir="ltr">Any clue when, new major version will be released?<div><br></div><div>T</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 3, 2019 at 3:45 PM Alan Lord <<a href="mailto:alanslists@gmail.com">alanslists@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Just FYI - with the #899 patch I can do what I need with an Event <br>
Handler, but not with a custom Workflow function.<br>
<br>
$current_user in the custom Workflow function always seems to be admin.<br>
<br>
Al<br>
<br>
On 31/05/2019 12:44, Alan Lord wrote:<br>
> Ignore this particular issue.<br>
> <br>
> For some reason the system I was developing on didn't have the patch <br>
> from #899 in it :-(<br>
> <br>
> <a href="http://code.vtiger.com/vtiger/vtigercrm/issues/899" rel="noreferrer" target="_blank">http://code.vtiger.com/vtiger/vtigercrm/issues/899</a><br>
> <br>
> Sorry for the noise.<br>
> <br>
> Al<br>
> <br>
> On 31/05/2019 12:22, Alan Lord wrote:<br>
>> I raised a ticket [1] loosely related to this subject not so long ago <br>
>> but it seems the issue is more widespread... A quick search of google <br>
>> shows quite a few people coming up against the same problems...<br>
>><br>
>><br>
>> I wanted to write a Custom Workflow function that would populate a <br>
>> field with the $current_user's user_name when they changed a certain <br>
>> field to something else.<br>
>><br>
>> Using a Workflow function proved unworkable because by the time the <br>
>> workflow function was triggered the $current_user is set to "admin".<br>
>><br>
>> So I thought I'd try and event Handler instead and use the <br>
>> VTEntityDelta to determine if the right field had been changed...<br>
>><br>
>> Unfortunately, vtiger.event.aftersave, and <br>
>> vtiger.event.aftersave.final both exhibit the same problem - the <br>
>> global var $current_user is always "admin" irrespective of which user <br>
>> actually triggered the event.<br>
>><br>
>> vtiger_even.beforesave and beforesave.final do have the correct <br>
>> $current_user, but they do not have a delta.<br>
>><br>
>>  From my searches online these changes seem to have happened with a <br>
>> fairly recent update but I am not clear where or when this happened.<br>
>><br>
>> But irrespective - this is extremely annoying and has wasted a lot of <br>
>> my time.<br>
>><br>
>> [1] <a href="http://code.vtiger.com/vtiger/vtigercrm/issues/1125" rel="noreferrer" target="_blank">http://code.vtiger.com/vtiger/vtigercrm/issues/1125</a><br>
>><br>
<br>
<br>
<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>