Search code examples
liferay-6liferay-aui

How to create a sub-organization in Liferay 6.1


I want to create a sub-organization inside a Organization in Liferay 6.1.

Please guide me to achieve this.

Regards, Dinesh.


Solution

  • To create sub organization you can use this code snippet

    OrganizationLocalServiceUtil.addOrganization (
                    userId, parentOrganizationId, name,
                    type, recursable, regionId, countryId,
                    statusId, comments, false, serviceContext);
    

    Note :- Pass parentOrganizationId to link sub organization to parent oraganization

    HTH