Search code examples
liferay

How do I add a new article in Liferay 6.1 programmatically?


In liferay 6.0 you can use

JournalArticleServiceUtil.addArticle

But now there are some new arguments in this method:

long classNameId, long classPK

What does its mean?


Solution

  • For adding journal articles, it looks like you can pass 0 for both values.

    It appears it was added for your convince as a 3rd party developer to find articles created for your application quicker. See, http://issues.liferay.com/browse/LPS-16960.