How to get Publication and Pages list from Publishing Queue Using Coreservices, which are published in Last 24hours.
we are using SDL Tridion Sites 9.1.0
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It only takes a minute to sign up.
Sign up to join this communityEach item has publish info. You can use:
PublishInfoData[] publishInfoData = CoreServiceConnector.Client.GetListPublishInfo(item);
PublishInfoData class has the property PublishedAt
, so you can filter there all for the last 24 hours.
So you can list every item in Tridion, get its published info, and then see if it was published somewhere in the last 24 hours.
You cannot check just transactions in the queue because some might remove their own transaction after it was done.
Another option, which might be a better one regarding performance would be to create Event System that would for each successful transaction send Transaction data to some custom storage (to some DB, or service). Then you can query that service periodically. It would give you flexibility where you would not check all items in Tridion for their publish info, and you will use your own data.
Complimenting Marko's answer on the Event System, you could also look at extending Tridion CM search to store such information within the SOLR index as well. This way you can leverage existing infra and benefit from SOLR's powerful querying which can be executed via Core Service.
See Arjen's post: http://80000ft.blogspot.com/2012/08/search-indexing-handlers.html for approach to extending search and Quirijn's on leveraging the full potential of search: http://blog.trivident.com/releasing-the-tiger-how-to-profit-from-solr-in-your-tridion-cm/