I am using Asset Publisher and need to dynamically get the articleId of the latest journal article published.
I am using in abstracts.jsp hook:
version=JournalArticleLocalServiceUtil.getLatestVersion(assetRenderer.getGroupId(), "14405");
journalArticle = JournalArticleLocalServiceUtil.getArticle(assetRenderer.getGroupId() , "14405",version);
I have hardcoded the articleId here. How do I avoid this??
Kindly help. Thanks.