Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Programmatically create version for a page

sreekalyanip
Level 3
Level 3

I have requirement to create a version of a page by below points.

I have searched and found out that VersionManager can be helpful. But I did not find any property to set the value.

  • Version of the page has to be created with the following:
    • notes documentation
    • Initiator of the workflow
    • Approver of the workflow

Any thoughts how to proceed further.

Thanks

Kalyani

1 Accepted Solution
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor

Hi,

You can check below

new Versions don't appear in Sidekick when created trhough VersionManager

As a version comment you can put all three details.

Thanks

Arun

View solution in original post

4 Replies
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor

Hi,

You can check below

new Versions don't appear in Sidekick when created trhough VersionManager

As a version comment you can put all three details.

Thanks

Arun

View solution in original post

sreekalyanip
Level 3
Level 3

Hi Arun,

After following the link i was able to create a new version label. But when i tried to preview the content or compare with current from sites.html i am seeing a blank page

1534619_pastedImage_1.png

1534620_pastedImage_2.png

So how to proceed with this.

Thanks,

Kalyani

Arun_Patidar
Community Advisor
Community Advisor

Hi Kalyani,

I tried creating page version with same. and I can see the both version.

Can you try to edit current version and then try to compare?

Screen Shot 2018-07-24 at 8.05.10 PM.png

aem63app-repo/CreateVersionPage.java at master · arunpatidar02/aem63app-repo · GitHub

Thanks

Arun

sreekalyanip
Level 3
Level 3

Thanks Arun,

I used to create the version by VersionManager. So was not able to compare it. But by using PageManager able to see the differences.