Setting Up the Application Evaluation Object
When reviewing applications, Delectable Bonsai must store evaluation notes for each distributor application they receive. To achieve this, the Delectable Bonsai development team created an Application Evaluation object and added the necessary fields.
They created this object definition in a separate environment, but they exported it as JSON so you can import it to your environment with the Distributor Application object.
Here you’ll use this JSON file to import the Application Evaluation object into your Liferay instance. But first, create the object’s picklists using the headless-admin-list-type
REST APIs.
Creating the Picklists
The Application Evaluation object requires these picklists: Assessment Scores, Recommendations, and Decisions.
-
Download and unzip the resources for this exercise:
curl https://resources.learn.liferay.com/courses/latest/en/application-development/modeling-data-structures/liferay-w1m9.zip -O
unzip liferay-w1m9.zip
-
Navigate to the
curl
folder in theliferay-w1m9
folder:cd liferay-w1m9/curl
-
Run this command to create three picklists for the Application Evaluation object:
./ListTypeDefinition_POST_ToInstance.sh
-
Verify the picklists appear.
With the picklists in place, you can import the Application Evaluation object.
Importing the Application Evaluation Object
-
Open the Global Menu ( ), go to the Control Panel tab, and click Objects.
-
Click Actions ( ) in the Application Bar and select Import.
-
Enter these details and click Import.
Field Value Name ApplicationEvaluation
JSON File Object_ApplicationEvaluation.json
The Application Evaluation JSON file is in the
liferay-w1m9
folder. This file includes the object’s basic schema, including general configurations and custom fields. -
Begin editing the object definition.
-
Verify the object includes these custom fields:
- Business Name
- Assessment Score
- Attachment
- Decision
- Interview Notes
- Recommendation Comments
- Recommendations
-
Go to the Details tab.
-
Click Publish.
Great! Delectable Bonsai can use this object to store notes on prospective distributors.
Now you can define a relationship between the Distributor Application and Application Evaluation objects so you can link their entries.