locked
Workflow logged in User RRS feed

  • Question

  • Hi All,

    I have created a custom workflow and i need to get the name of the user initating the workflow

    I have logged in as project manager and then starting the workflow ,but when i give the following command

    this.workflowProperties.Originator; //i get the system account


    How to get the username of the logged in user

    Thanks

    Girish


    Girish
    Wednesday, December 3, 2008 11:40 AM

Answers

  •  You can get the current user by accessing e.identity property in your WF event.

    Ex.

    private void onWorkflowActivated_Invoked(object sender, ExternalDataEventArgs e)
    {
     
     String User = e.Identity;
    }

    Wednesday, December 3, 2008 5:28 PM

All replies

  • I also needed this, but i didn't found it.
    Think it's because a custom workflow uses the system account.

    Or is there a solution ?

    Wednesday, December 3, 2008 12:29 PM
  •  You can get the current user by accessing e.identity property in your WF event.

    Ex.

    private void onWorkflowActivated_Invoked(object sender, ExternalDataEventArgs e)
    {
     
     String User = e.Identity;
    }

    Wednesday, December 3, 2008 5:28 PM
  • Where would this be modified in SharePoint Designer 2007 (if at all)?  I'm trying to get the same data using the OOTB Designer Workflow tools and options.  I'm not a Visual Studio Dev, so I only have SPD2007 options available to me.
    Wednesday, June 25, 2014 9:34 PM