Issue
-
When I use the OOTB Account object by adding a relation to a custom object that includes aggregation fields and a custom picklist field, the aggregation fields are returning as an empty string ““ from the API response.
Steps to Reproduce:
-
Start 2025.q1.2-lts
-
Create a Picklist with at least one entry (e.g., "Foo") from Control Panel → Object → Picklists.
-
Add a custom field named "picklistField" of type "Picklist" to the Account object definition, selecting the Picklist created in step 1.
-
Create an Object (ObjectA) and publish it.
-
Create a one-to-many relation from Account to ObjectA.
-
Add a custom field "countB" of type "Aggregation" for the relation, using the aggregation function "Count".
-
Create an Account from Control Panel → Accounts → Accounts and note its accountEntryId.
-
Insert a new record into accountentry_x_20095 using the noted accountEntryId and set the value "Foo" for the picklist field (picklistField_).
-
Clear the database cache via the Control Panel → SYSTEM → Server Administration → Cache Actions.
-
Use the Liferay API Explorer “GET” (e.g., /o/headless-admin-user/v1.0/accounts/{accountId}). The response correctly includes the picklist field with the value "Foo" and the aggregation field countB with the value "0".
-
Delete the corresponding record from accountentry_x_20095.
-
Clear the database cache again via the Control Panel.
-
Re-run the API call. Now.
Actual Result: The fields are returning an empty string value ““.
Expected Result: The fields should the correct values because the aggregation reference remains.
Environment
- Liferay Quarterly Release 2025.q1.2-lts
Resolution
- The Aggregation Fields were never supported for System Objects "OOTB" (such as Account). This is why it is always returning 0 or empty string. A feature request is under review by the Product Team to address this case: LPD-51575
- To check on the progress of the request, you can ask at the Liferay Ask link: https://liferay.dev/ask/questions/feature-requests
Additional Information
- https://help.liferay.com/hc/en-us/articles/360018123132-Requesting-a-New-Feature-or-Feature-Improvement