Skip to main content

add under anonymous user listitem, but set created by field with an existing user?

I have a form with some fields like name, lastname, address, phonenumber etc. This page is accessible to anonymous users. The code behind is adding a new listitem under administrator privileges. When I go to the list I see an empty created by field. I would like to add programmatically for each new item a value with some existing user account.

The reason why I would like to do that is because on this list I have a workflow. And it is triggered on each new item. When I fill in the form anonymously the workflow is also running under an anonymous user. But it stuck in the progress status. When I log in with some user everything is working fine. So I would like to manipulate the system like the item which is created will run the workflow on some account.

the workflow is just a simple email with the items inside of it. It is created in SharePoint designer.

Ola
  • 4.4k
  • 27
  • 129
  • 232