vamsi
vamsi

Reputation: 1359

How to set URL for new organization in Liferay through coding

I have to create organization in liferay through code right now I am using

liferayOrganizationService.addOrganization(parentOrganizationId, organizationName, OrganizationConstants.TYPE_REGULAR_ORGANIZATION, false, 0, 0,ListTypeConstants.ORGANIZATION_STATUS_DEFAULT, organizationName, true, serviceContext);

But through this I am not able to set the friendlyUrl for the organization as it is getting created automatically. So is there any way in which I can customize the organization URL. Please, let me know.

Upvotes: 1

Views: 108

Answers (1)

Olaf Kock
Olaf Kock

Reputation: 48057

The friendly URLs are associated with the sites that you create along with an organization. You can use GroupLocalService.getOrganizationGroup to get the group associated with this Organization, then continue to operate on this. Group is the technical name for site.

Upvotes: 1

Related Questions