Migrating to Liferay Objects
Dynamic Data Lists is deprecated and scheduled for removal by the end of 2024. To prevent data loss and achieve the same functionality, please migrate your structures and data to Liferay Objects. Objects provides low-code capabilities for building applications in the Liferay UI without having to write code or deploy modules. Each application is fully integrated with Liferay’s core frameworks (e.g., headless, permissions, workflow) and can be accessed via the UI or dedicated REST APIs to create and manage data entries.
Working with Dynamic Data Lists involves creating data definitions and then using them to create forms (DDLRecordSet
) that store lists of data entries (DDLRecords
). Using Objects involves creating, relating, and publishing object definitions. Once published, you can then access the application to create object entries. In comparison with DDL, Objects provides a far more robust and integrated experience for modeling data structures while including additional tools for implementing custom business logic and designing user interfaces.
To migrate your data,
-
Create an object definition for your dynamic data list. If the list includes select or radio fields, you must also create picklists for defining these options.
-
Export your data list’s records as an XML or CSV file and convert it to a JSON file.
-
Import the JSON file to your object definition using the Data Migration Center.
To use the Data Migration Center, you must enable the COMMERCE-8087 beta feature flag.
Creating an Object Definition for a Dynamic Data List
-
Open the Global Menu (), go to the Control Panel tab, and click Objects.
-
Go to the desired object folder and click the Add button ().
-
Provide these details for the draft.
Label: Identifies the object in the Objects admin and supported application contexts (e.g., Workflow, Display Page Templates, Forms).
Plural Label: Determines the display name for the object application in the UI.
Object Name: Determines the object’s
definition.name
and cannot be changed after publishing. -
Click Save.
Once created, you can edit the object to configure its scope, platform integrations, and more. See Editing Object Drafts for more information.
If your dynamic data list includes Select and Radio fields, you must add picklists to store these field options. Otherwise, you can continue to add data fields to the object definition.
Adding Picklists
-
Open the Global Menu (), go to the Control Panel tab, and click Picklists.
-
Click Add ().
-
Enter a name for the list.
-
Edit the picklist.
-
Under Items, click Add ().
-
Enter a name and key for the item.
Name: Determines the item’s display name and can be localized after creation.
Key: Determines the item’s value stored by object fields and uses camel case.
ImportantThe item’s key value must match the option names set in the data list’s Select or Radio field. If the Select and Radio fields do not use camel case, update the option names to match the picklist item keys.
-
Click Save.
-
Repeat the above steps to add other items.
Once you’ve created your picklists, you can use them for data fields in your object definition.
Adding Data Fields
-
Begin editing your object definition.
-
Go to the Fields tab and click Add ().
-
Enter a Label and Field Name.
Label: This value identifies the field in the Objects UI and can be localized after the field is created.
Field Name: This value determines the field’s name in the backend and uses camel case. Once a field is published, this value cannot be changed.
-
Select a field Type. See Field Compatibility Reference for which field types are compatible with DDL fields.
-
Determine whether the field is mandatory.
-
Click Save.
-
Repeat the above steps to add other fields.
Once you’ve added data fields, edit them to configure additional settings, such as searchability, default values, and localizability. See Fields for more information.
Publishing the Object Definition
After configuring your object definition and adding data fields, publish the object to make it available for use. To do this, go to the object’s Details tab and click Publish. Once published, you can design forms and displays for the object. To design administrative interfaces, see Layouts and Views. To learn about object integrations with the info framework and page builder features, see Displaying Object Entries and Using Fragments to Build Forms.
Next, export your data list records and import them to the custom object definition.
Exporting and Converting Data Entries
-
Open the Site Menu (), expand Content & Data, and click Dynamic Data Lists.
-
Click the Actions button () for the desired data list and select Export.
ImportantNested field values are not exported.
-
Select CSV or XML and click OK.
-
Use a third party service to convert the file to JSON.
Once your JSON file is ready, you can import it to the custom object definition.
Importing DDL Entries
-
Open the Global Menu (), go to the Applications tab, and click Data Migration Center.
-
Click Add () and select Import File.
-
Enter a Name for the import.
-
For Entity Type, select your custom object.
-
Select the JSON file with your data list records.
-
Map the source file fields to object definition fields.
-
Click Next.
-
Review the field mapping for your records and click Start Import.
-
Confirm the import is successful.
-
Verify the entries appear in the custom object.
Field Compatibility Reference
DDL Field Type | Object Field Type |
---|---|
Boolean | Boolean |
Color | Text |
Date | Date |
Decimal | Decimal |
Documents and Media | Attachments |
Geolocation | Text |
HTML | Rich Text |
Integer | Integer |
Link to Page | Rich Text |
Number | Decimal |
Radio | Picklist |
Select | Picklist |
Text | Text |
Text Box | Long Text |
Web Content | Rich Text |