Skip to main content
Level 4
October 26, 2026
Question

Does AEM 6.5 captures the first published date for a form in aem forms on AEM 6.5 (on prem)

Hi ,

We have a requirement to capture the statistics for the forms on aem 6.5 system.

Is it possible to capture the first published date for the form in AEM forms on aem 6.5. I know we can captured the last published date from here: 

 

Similarly we need to capture the first publish date of this form.

Can anyone please suggest, thank you.

3 replies

Level 2
October 26, 2026

​@SmrithiGo ,

AEM only keeps the last replication. cq:lastReplicated is overwritten on every publish, so there’s no out-of-the-box first publish date. Version history won’t help much either, since form versions in 6.5 are created manually by authors, not on publish.

You can capture the date yourself. Add an OSGi event handler on the replication topic (com/day/cq/replication) that runs on Author. When an ACTIVATE event arrives for a form, read it with ReplicationAction.fromEvent(event), and in a Sling job set a firstPublished property on the form’s jcr:content, only if it’s empty. Check in CRXDE where your forms are stored and what node type they use, so you put the property in the right place.

For forms that are already published, the only source is the replication audit log. Maintenance purges it, and it doesn’t show whether an entry was the first activation. In practice you’d have dates only from now on, or mark older ones as approximate.

Test on one form first. Forms uses cq:lastModified and cq:lastReplicated for its outdated-resource checks, so confirm the extra property doesn’t change that.
Regards,

Santhosh

Translate
SmrithiGoAuthor
Level 4
October 26, 2026

Hi ​@social_portfolio81db , Thank you for your response. Just to clarify, so for the existing forms, there is no way to capture this data. But for the future forms, we can create this custom property “firstPublished”., by having this custom event handler in place. 

Translate
Level 2
October 26, 2026

​@SmrithiGo ,

Yes. That should be the only option as we will not know anywhere when this was published for the first time.

Regards,

Santhosh

Translate