Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: RE: i am try to display the organization list in liferay but it show exception
com.liferay.portal.kernel.exception.NoSuchResourcePermissionException: {companyId=20096, name=com.liferay.portal.kernel.model.Organization, primKey=602, scope=4}
In case you're expecting us to locate a problem with the code that you use to display the list, we'd need to see it (and we'd need to know which exact version it's running on)
public long addOrganization(long userId, String name,long
regionId,long countryId, String location,String company_address,String
treePath, ServiceContext serviceContext) throws PortalException {
User user = userLocalService.getUser(userId);
long organizationId =
counterLocalService.increment(Organization.class.getName());
Organization organization =
organizationPersistence.createOrganization(organizationId);
long parentOrganizationId =
organization.getParentOrganizationId();
organization.setUuid(serviceContext.getUuid());
organization.setCompanyId(serviceContext.getCompanyId());
organization.setUserId(userId);
organization.setUserName(user.getFullName());
organization.setCreateDate(serviceContext.getCreateDate(new
Date()));
organization.setModifiedDate(serviceContext.getModifiedDate(new
Date()));
organization.setName(name);
organization.setType(OrganizationConstants.TYPE_ORGANIZATION);
organization.setRegionId(regionId);
organization.setCountryId(countryId);
organization.setComments("");
organization.setExpandoBridgeAttributes(serviceContext);
organization.setRecursable(true);
organization.setStatusListTypeId(12017);
organization.setTreePath("/608/");
organizationPersistence.updateOrganization(organization);
return organization.getOrganizationId();
}
this is the code i try to add the organization from custom portlet.Sucessfully its added but i try to display that it show error.
Powered by Liferay™