I’m developing a liferay portlet. I use Service Builder. The question is that do I have to use companyID and groupID in my entity fields? What should I do if I don’t want to have these fields? If I don’t use them how can I use resourceLocalService.addResources() method?
Share
They are not required but they are convenient to have.
Liferay has many additional services available to you to use like permissions, users, document library. These services are almost always scoped to a portal instance, for example, Users are scoped to an instance which is tracked by
companyId. Some are scoped to a group like document library.So depending on what Liferay services you are planning to use and at what scope those services operate, it is convenient to have those values stored as well for easy lookup when you’re calling those services you are using.