Combination View Flat View Tree View
Threads [ Previous | Next ]
venka reddy
How to retrieve journalarticle
August 17, 2013 10:54 AM
Answer

venka reddy

Rank: Regular Member

Posts: 231

Join Date: March 23, 2011

Recent Posts

Hi,

I want to retrieve Journal article from articleid so i have written as follows as ,

JournalArticle journalArticle = JournalArticleLocalServiceUtil.getArticle(articleId);

but it throws exception as com.liferay.portlet.journal.NoSuchArticleException: No JournalArticle exists with the primary key 29935.

For your information i am writing this method in scheduler class in receive method.
Wilson Man
RE: How to retrieve journalarticle
August 18, 2013 9:38 AM
Answer

Wilson Man

LIFERAY STAFF

Rank: Liferay Master

Posts: 577

Join Date: June 21, 2006

Recent Posts

Hi Venka,

the getArticle(long id) method does not take in an articleId but rather the table specific id_ primary key instead. Note that articleId and id_ are different.
In your case, you should use this method instead: getArticle(long groupId, String articleId)
Meera Prince
RE: How to retrieve journalarticle
August 18, 2013 8:54 PM
Answer

Meera Prince

Rank: Liferay Master

Posts: 838

Join Date: February 8, 2011

Recent Posts

HI

Go through following classes you can find many methods

JournalArticleLocalServiceUtil

JournalArticleServiceUtil


JournalArticleUtil

Thanks&Regards,

Meera Prince
venka reddy
RE: How to retrieve journalarticle
August 18, 2013 10:59 PM
Answer

venka reddy

Rank: Regular Member

Posts: 231

Join Date: March 23, 2011

Recent Posts

Wilson,

I need to reterive the article in scheduler class which has doreceive method, So i cannot reterive groupId!