Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Is there a way to set jcr:createdBy property value while creating page programatically?

Avatar

Level 2

Is there a way to set jcr:createdBy property value while creating page programatically?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Following properties of a page are created automatically and protected.

AEM will not allow us to edit this information. It is retrieved from the Session object,

aanchalsikka_1-1701827777398.png

 

 


Aanchal Sikka

View solution in original post

3 Replies

Avatar

Employee

Hello,

This property is defined in the mix:created node and should automatically be created when you create a page either manually or programmatically. Be sure to use the PageManager to create the page in your code.

Avatar

Level 1

We're using the pageManager object to create the page. After the page is created the jcr:createdBy property is taken from the user ID available in the session object which is taken from the slingRequest object.

Now is there any possibility to update/override this property programatically?

Avatar

Correct answer by
Community Advisor

Following properties of a page are created automatically and protected.

AEM will not allow us to edit this information. It is retrieved from the Session object,

aanchalsikka_1-1701827777398.png

 

 


Aanchal Sikka