Exporting and Importing Object Structures¶
Available for Liferay DXP 7.4 U5+ and Portal 7.4 GA9+
With Liferay Objects, you can import and export Object structures as
.json files. This provides flexibility during application development, enabling users to easily migrate Object definitions between Liferay environments.
As of Liferay DXP 7.4 U5 and Portal 7.4 GA9, Objects does not support importing or exporting Relationships. All other Object configurations and structure elements are supported (e.g., scope, Fields, Layouts).
Follow these steps to export an Object structure:
Open the Global Menu (), go to the Control Panel tab, and click on Objects.
Click on the Actions button () for the desired Object and select Export as JSON.
Click Save in the dialog window to begin downloading the Object’s definition as a JSON file.
This file includes the Object’s Fields, Layouts, Actions, and general configuration details (e.g., label, scope, etc.). If the exported Object has Relationships, they are not included in the JSON file.
Once exported, you can import the Object definition into compatible Liferay environments.
Follow these steps to import an Object structure:
Open the Global Menu (), click on the Control Panel tab, and go to Objects.
Click the Actions button () in the Application Bar and select Import Object.
Enter a name for the new Object and select the JSON file you want to import.
Object names must be unique and use PascalCase.
The Object structure imports in the background and can take a few minutes.