Change Author field in SharePoint list Item

This article will describe a 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, it was 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.