Skip to content

Instantly share code, notes, and snippets.

@slemarchand
Last active October 23, 2018 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slemarchand/e30009511076b17933a3ea84b4d3ca11 to your computer and use it in GitHub Desktop.
Save slemarchand/e30009511076b17933a3ea84b4d3ca11 to your computer and use it in GitHub Desktop.
import com.liferay.portal.util.*
import com.liferay.portal.service.*
import com.liferay.portal.model.*
PORTLET_ID = '56'
companyId = PortalUtil.getCompanyId(actionRequest)
groups = GroupLocalServiceUtil.getGroups(companyId, GroupConstants.ANY_PARENT_GROUP_ID, true)
groups.each { g ->
groupId = g.getGroupId()
out.println(PortalUtil.getPlidFromPortletId(groupId, PORTLET_ID))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment