Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
piyush liferay
How to Create Organization ??
February 22, 2013 11:09 PM
Answer

piyush liferay

Rank: Junior Member

Posts: 40

Join Date: January 1, 2013

Recent Posts

Hello,

can you suggest me which method is used for creating a organization in liferay....
Subhash Pavuskar
RE: How to Create Organization ??
February 23, 2013 12:10 AM
Answer

Subhash Pavuskar

Rank: Regular Member

Posts: 234

Join Date: March 12, 2012

Recent Posts

Hi Piyush ,

You can create organization using OrganizationLocalServiceUtil !!

1public Organization addOrganization(
2         long userId, long parentOrganizationId, String name, String type,
3         boolean recursable, long regionId, long countryId, int statusId,
4         String comments, boolean site, ServiceContext serviceContext)
5         throws PortalException, SystemException;
Kowbathullah Gnaniyar
RE: How to Create Organization ??
February 23, 2013 1:09 AM
Answer

Kowbathullah Gnaniyar

Rank: Liferay Master

Posts: 605

Join Date: December 19, 2007

Recent Posts

Try this :

1OrganizationLocalServiceUtil.addOrganization(userId,
2                OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID, "My-Organization-Name", OrganizationConstants.TYPE_REGULAR_ORGANIZATION,
3                                 true, 0, 0, ListTypeConstants.ORGANIZATION_STATUS_DEFAULT,"Organization description", true, new ServiceContext());
Hitoshi Ozawa
RE: How to Create Organization ??
February 23, 2013 6:34 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

Check the addOrganization in following class.

http://docs.liferay.com/portal/6.1/javadocs/com/liferay/portal/service/OrganizationLocalServiceUtil.html