Try our conversational search powered by Generative AI!

Set CreatedBy Progammatically


Hi all.

Is it possible to set/override the value of CreatedBy when creating a new page programmatically?


Aug 22, 2012 8:29

I think you can just set it on the PageData object, but remember that all built in ("metadata") properties are prefixed with "Page" so the CreatedBy property is set through CurrentPage["PageCreatedBy"] = "myuser"; etc.

Aug 22, 2012 8:55

I just tried this Magnus, but the CreatedBy was still set to the logged in user.

Any other tip?


Aug 22, 2012 9:11

I thought it only was when the page was created in the UI, but apparently I was wrong :)

I suppose you could try to listen to one of the datafactory events and change the property after the page is initially saved (fetch a specific version and save using the ForceCurrentVersion flag if you don't want to create an extra version, see the end of this blog post: )

Aug 22, 2012 10:53

Thanks Magnus, I'll have a look at it and see if I can wrap my head around this...


Aug 22, 2012 11:43

Hi Magnus.

I did as suggested:

1.Created and published the page

2. Opened the page again as a writable clone

3. Specified a new value for "PageCreatedBY"

4. Published the page with "ForceCurrentVersion" (which was very nice)

This did not help anything "CreatedBy" remained unchanged...

In the meantime I did a successful workaround on the issue that led me down this path, so I will let this one rest as it really was the least desirable solution.



Aug 23, 2012 7:06
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.