Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A workflow that assigns invoices to the current user after saving
#2
Workflow custom functions are executed immediately on the save event and at that moment the $current_user variable contains the user launching the save. Although I think the code you have is correct and should work correctly because the session variable must also contain the current user id, you can use the $current_user object.

$current_user->id

and even just the session variable directly, there is no need to go through the trouble of creating the user object and the extra database queries

$params = array($_SESSION['authenticated_user_id'], $invoice_crm_id);

I'd say it will work.
Joe
TSolucio
Reply


Messages In This Thread
RE: A workflow that assigns invoices to the current user after saving - joebordes - 12-06-2016, 10:10 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)