留言板
Get Organization's Categories
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.
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.
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.