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

Publish / unpublish History

Avatar

Level 2

Hi

 

Is there any way of checking if a page was unpublished before it was published?
Want to check when (Date) it got published and when (Date) it got unpublished and User who published & unpublished

Thanks in Advance !!!

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi @Sigkumar ,

You can use ReplicationStatus to get the deactivated/unpublished status of the page:

 

ReplicationStatus status = page.adaptTo(ReplicationStatus.class);
boolean deactivatedStatus = status.isDeactivated();

 You can also check the activated/published status below:

boolean activatedStatus = status.isActivated();

Hope this could help you

Thanks

Shiv 

View solution in original post

3 Replies

Avatar

Correct answer by
Level 4

Hi @Sigkumar ,

You can use ReplicationStatus to get the deactivated/unpublished status of the page:

 

ReplicationStatus status = page.adaptTo(ReplicationStatus.class);
boolean deactivatedStatus = status.isDeactivated();

 You can also check the activated/published status below:

boolean activatedStatus = status.isActivated();

Hope this could help you

Thanks

Shiv