Hi Alan,<br><br>going by memory $current_user should have current user information, $current_user is changed only for workflow tasks other than entity method.<br><br>to get the assigned to user i recommend using this function defined in include/Webservices/Utils.php file,<br>
<br>vtws_getWebserviceEntityId('Users', $current_user->id);<br><br><div class="gmail_quote">On Wed, Aug 25, 2010 at 4:13 AM, Alan Lord (News) <span dir="ltr"><<a href="mailto:alanslists@gmail.com">alanslists@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Following on a little further, I was playing around with trying to<br>
providing some more useful information in the description field of the<br>
newly automatically created Project module:<br>
<br>
$description =<br>
"This Project was automatically created when Potential No. " .<br>
$entity->get('potential_no') . " was changed to Status: " .<br>
$entity->get('sales_stage') . " by user: " .<br>
$entity->get('user_name') . ".\n\n" .<br>
$entity->get('description');<br>
<br>
Now, the interesting puzzle is how to get the *actual* user that changed<br>
the potential?<br>
<br>
The Workflow process itself always runs as admin from what I can tell.<br>
<br>
I'm thinking I need to check the modifiedby (and possibly smcreatorid)<br>
fields of the crmentity. If it isn't "1" then I know to go and get the<br>
username from this id. Does that sound about right? Are there any<br>
built-in functions to check these fields?<br>
<div><div></div><div class="h5"><br>
Cheers<br>
<br>
<br>
Al<br>
<br>
--<br>
The Open Learning Centre<br>
<a href="http://www.theopenlearningcentre.com" target="_blank">http://www.theopenlearningcentre.com</a><br>
<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</div></div></blockquote></div><br>