Unable to adjust the Mandatory status of a field after publishing the Object Definition

Issue

  • This article documents intended behavior where the Mandatory status of a field cannot be adjusted after publishing an Object Definition

Environment

  • Liferay DXP 7.4+
  • Liferay 2023.Q3+

Resolution

  • This is the intended behavior. After publishing the Object Definition, it is possible to save empty entries to a non-mandatory field. Therefore, we would have an inconsistent scenario if the field was made mandatory after empty entries have been saved.
  • On an LXC environment, or if the Feature Flag for COMMERCE-8087 is enabled (i.e., configure portal-ext.properties to include feature.flag.COMMERCE-8087=true), we can workaround this behavior by exporting the Object entries, recreating the Object definition with the desired field changes, and reimporting it through Import/Export Center which is discussed in Batch Client Extensions article. Please note that as Feature Flags are experimental and/or beta functionality, they may be subject to change.

Additional Information

Was this article helpful?
0 out of 1 found this helpful