留言板

Get Organization's Categories

Kevin Klippenstein,修改在10 年前。

Get Organization's Categories

New Member 帖子: 20 加入日期: 13-2-22 最近的帖子
Hi,

I am trying to get all the categories that an organization has but I can not find any reference on how to accomplish this.

Does anyone know of a way to access this information through code?

Thanks,
Kevin K.
Kevin Klippenstein,修改在10 年前。

RE: Get Organization's Categories

New Member 帖子: 20 加入日期: 13-2-22 最近的帖子
After some further research and digging around in the database I was able to get the list of categories from the organization by using the following:

Organization organization = OrganizationLocalServiceUtil.getOrganization(companyId,usersExternalOrganizationName);
long organizationPK = organization.getPrimaryKey();
List<AssetCategory> assetCategoryList = AssetCategoryLocalServiceUtil.getCategories(Organization.class.getName(), organizationPK);

Hopefully this helps someone else in the same situation.
thumbnail
Orin Fink,修改在7 年前。

RE: Get Organization's Categories

Junior Member 帖子: 65 加入日期: 10-3-25 最近的帖子
Kevin Klippenstein:

Hopefully this helps someone else in the same situation.


Yes, yes it did help. Thanks Kevin. Just the snippet I needed.