Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Dileep Shiva
Retrieve the activityId of a social activity upon creation - LR 6.1
April 2, 2012 5:22 AM
Answer

Dileep Shiva

Rank: New Member

Posts: 2

Join Date: March 4, 2011

Recent Posts

Hi,

In LR 6 SP1, we persisted custom activities using SocialActivity activity = SocialActivityLocalServiceUtil.addActivity(user.getUserId(), user.getGroup().getGroupId(), CUSTOMACTIVITY.class.getName(), 0, 1, scope, 0);. Then, using the SocialActivity.activityId, we persisted more details about the custom activity in a different table.

In LR 6.1, SocialActivityLocalServiceUtil.addActivity() doesn't return a SocialActivity object. So, I'm wondering if there is a way to retrieve the activity id of the added social activity.

Any help is greatly appreciated.

Thanks,
Dileep

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!