SharePoint Experts Blog

How to change Author field in SharePoint List Item

In this small tip, I want to continue theme related to HelpDesk creation in Office365 or OnPremises. I want to describe small addition that will help to change Created By field to correct user name as on the figure below:

Change author field in SharePoint List Item

The basic idea is very simple. We need to create a Contacts list, which consists from the following fields:

  • Title (Text)
  • Email (Text)
  • User (SPUser)

The Contact list will be used to lookup SPUser account by email.
In main workflow, I have added another stage that will lookup user by Email and set Author field.

Change author field workflow

There are two important moments:
The first is setting SPUserID variable. As you can see at the screenshot below, I query ‘Contacts’ list by Email field and select ‘User Id’ value.

Lookup SPUser by email

The second is updating ‘Author’ field via Update List Item at Any Site workflow action. For this we pass filled dictionary as input parameter:

Change author field workflow action

That is all. Now we need to fill the ‘Contacts’ list and we will get correct ‘Author’ field.

Please feel free to comment

Posted in: Products, Workflow Actions Pack