<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Unable to update object definition fields in UI / batch client-extension</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=122371638" />
  <subtitle>Unable to update object definition fields in UI / batch client-extension</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=122371638</id>
  <updated>2026-04-07T22:13:49Z</updated>
  <dc:date>2026-04-07T22:13:49Z</dc:date>
  <entry>
    <title>RE: Unable to update object definition fields in UI / batch client-extension</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122410468" />
    <author>
      <name>Jamie Sammons</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122410468</id>
    <updated>2024-02-20T19:00:57Z</updated>
    <published>2024-02-20T19:00:56Z</published>
    <summary type="html">&lt;p&gt;Hi Thomas,&lt;/p&gt;
&lt;p&gt;Please see our response from Product Management:&lt;/p&gt;
&lt;p&gt;We are making some changes with the help of headless team to allow
  users to make mandatory fields to be not mandatory, but we do not
  support making non-mandatory fields mandatory, this happens because
  you would need to have to add some type of logic to define what would
  be the default value of the empty fields when this configuration is
  done, as we can’t guarantee that those fields would be populated. You
  would need to do those changes manually indeed, one suggestion could
  be create another field and move with a script the existing values and
  the ones empty to add a default value based on the necessary logic
  from your application.&lt;/p&gt;
&lt;p&gt;The same rational is for changing the field types from a field, you
  would need to create a new field and add a custom logic to move the
  values from one column to the other with some kind of data transformation.&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;Exporting Liferay Objects data through the Export / Import center
    does not export tags and categories, so these are lost&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The problem there is that categories and tags are usually scoped to
  sites, where object structures are at instance level (even though the
  data can be scoped by sites).&lt;/p&gt;</summary>
    <dc:creator>Jamie Sammons</dc:creator>
    <dc:date>2024-02-20T19:00:56Z</dc:date>
  </entry>
  <entry>
    <title>RE: Unable to update object definition fields in UI / batch client-extension</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122372847" />
    <author>
      <name>Jamie Sammons</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122372847</id>
    <updated>2024-01-31T20:11:16Z</updated>
    <published>2024-01-31T20:11:15Z</published>
    <summary type="html">&lt;p&gt;Feature Request Created: https://liferay.atlassian.net/browse/LPD-16285&lt;/p&gt;</summary>
    <dc:creator>Jamie Sammons</dc:creator>
    <dc:date>2024-01-31T20:11:15Z</dc:date>
  </entry>
  <entry>
    <title>Unable to update object definition fields in UI / batch client-extension</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122371637" />
    <author>
      <name>Thomas Metten</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122371637</id>
    <updated>2024-01-31T17:42:33Z</updated>
    <published>2024-01-31T14:04:57Z</published>
    <summary type="html">&lt;p&gt;Our use-case:&lt;/p&gt;
&lt;p&gt;We developed some features by using Liferay Objects. In order to
  consistently and automatically configure these Liferay Objects, we
  created batch client-extensions in our codebase that hold the object
  definition yaml files for these objects, much like the following
  GitHub example from DevCon 2023: https://github.com/LiferayCloud/client-extensions-deep-dive-devcon-2023.&lt;/p&gt;
&lt;p&gt;Now the customer has been using these Objects for a while, creating a
  whole bunch of them. And after some time the customer asks for a
  change in the object definition for certain fields: &amp;quot;Make this
  field mandatory&amp;quot;, &amp;quot;Change this field's type from Long to String&amp;quot;.&lt;/p&gt;
&lt;p&gt;The issue:&lt;/p&gt;
&lt;p&gt;Changes like these are not supported through the UI, and neither are
  these kind of changes applied after updating the object definition in
  the batch client-extension. They are simply ignored. This issue is
  also partially. discussed over
  here: https://help.liferay.com/hc/en-us/articles/22034314807821-Unable-to-adjust-the-Mandatory-status-of-a-field-after-publishing-the-Object-Definition.
  Sadly the proposed solution in this article causes a lot of unwanted side-effects:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Exporting Liferay Objects data through the Export / Import center
    does not export tags and categories, so these are lost&lt;/li&gt;
  &lt;li&gt;Deleting the object definition and recreating it causes:  &lt;ul&gt;
      &lt;li&gt;Linked vocabularies to be linked to the old object definition
        id, these will have to be reconfigured.&lt;/li&gt;
      &lt;li&gt;Collections for these Liferay Objects are linked to the old
        object definition id, these will have to be reconfigured.&lt;/li&gt;
      &lt;li&gt;Display templates for these Liferay Objects are linked to the
        old object definition id, these cannot be reconfigured and will
        have to be deleted and recreated.&lt;/li&gt;
      &lt;li&gt;Display pages for these Liferay Objects are linked to the old
        object definition id, these also cannot be reconfigured and will
        have to be deleted and recreated as well.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Possible? solutions:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Allow us to include the object definition id in the yaml file, so
    we can delete and recreate the object definition without using a
    different id. In this scenario only the export and import of tags
    and categories in the Liferay Object export and import would have to
    be fixed.&lt;/li&gt;
  &lt;li&gt;Allow all possible updates in the object definition yaml. Yes this
    might cause mandatory fields to not be filled, and this might cause
    fields to lose data since the datatype has changed.&lt;/li&gt;
&lt;/ul&gt;</summary>
    <dc:creator>Thomas Metten</dc:creator>
    <dc:date>2024-01-31T14:04:57Z</dc:date>
  </entry>
</feed>
