<?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>Liferay 7.2 - What is classNameId in DDMStructureLocalServiceUtil</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117203297" />
  <subtitle>Liferay 7.2 - What is classNameId in DDMStructureLocalServiceUtil</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117203297</id>
  <updated>2026-04-04T14:15:31Z</updated>
  <dc:date>2026-04-04T14:15:31Z</dc:date>
  <entry>
    <title>RE: Liferay 7.2 - What is classNameId in DDMStructureLocalServiceUtil</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117206135" />
    <author>
      <name>Fabio Carvalho</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117206135</id>
    <updated>2019-09-18T17:41:06Z</updated>
    <published>2019-09-18T17:41:06Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Thanks Mohammed,&lt;br&gt;&lt;br&gt;I was trying to add a structure to DDMRecordSet, so I ended up with:&lt;br&gt;&lt;pre&gt;&lt;code&gt;ClassNameLocalServiceUtil.getClassNameId(DDLRecordSet.class)&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Fabio Carvalho</dc:creator>
    <dc:date>2019-09-18T17:41:06Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7.2 - What is classNameId in DDMStructureLocalServiceUtil</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117205767" />
    <author>
      <name>Mohammed Yasin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117205767</id>
    <updated>2019-09-18T17:10:53Z</updated>
    <published>2019-09-18T17:10:53Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi,&amp;nbsp;&lt;br&gt;You can pass classnameId of those class for which you want to add ddmstructure ,&lt;br&gt;Ex&lt;br&gt;If you want to add DDMStructure for JournalAritcle then you will pass classnameId of Journal article&lt;br&gt;If you want to add DDMStructure for&amp;nbsp;DDMFormInstance&amp;nbsp; then you can pass classnameId of&amp;nbsp;DDMFormInstance&lt;br&gt;Now to get classnameId you can either use&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;nbsp; ClassNameLocalServiceUtil.getClassNameId(DDMFormInstance.class)&amp;amp;nbsp; &amp;amp;nbsp; or&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;PortalUtil.getClassNameId(DDMFormInstance.class);&lt;/code&gt;&lt;/pre&gt;You can refer &lt;a href="https://proliferay.com/concept-of-classpk-in-liferay/"&gt;this &lt;/a&gt;for more understanding&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Mohammed Yasin</dc:creator>
    <dc:date>2019-09-18T17:10:53Z</dc:date>
  </entry>
  <entry>
    <title>Liferay 7.2 - What is classNameId in DDMStructureLocalServiceUtil</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117203296" />
    <author>
      <name>Fabio Carvalho</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117203296</id>
    <updated>2019-09-18T15:58:14Z</updated>
    <published>2019-09-18T15:58:14Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi,&lt;br&gt;&lt;br&gt;I am trying to add DDMStructures programmatically. For this I am using the following method:&lt;br&gt;&lt;pre&gt;&lt;code&gt;DDMStructureLocalServiceUtil.addStructure(
&amp;amp;nbsp; &amp;amp;nbsp; theme.getUserId(),&amp;amp;nbsp;
&amp;amp;nbsp; &amp;amp;nbsp; theme.getScopeGroupId(),&amp;amp;nbsp;
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;DDMStructureConstants.DEFAULT_PARENT_STRUCTURE_ID,&amp;amp;nbsp;
&amp;amp;nbsp; &amp;amp;nbsp; classNameId, //What is this?
&amp;amp;nbsp; &amp;amp;nbsp; null,&amp;amp;nbsp;
&amp;amp;nbsp; &amp;amp;nbsp; nameMap,&amp;amp;nbsp;
&amp;amp;nbsp; &amp;amp;nbsp; descriptionMap,&amp;amp;nbsp;
&amp;amp;nbsp; &amp;amp;nbsp; ddmForm,&amp;amp;nbsp;
&amp;amp;nbsp; &amp;amp;nbsp; ddmFormLayout,&amp;amp;nbsp;
&amp;amp;nbsp; &amp;amp;nbsp; StorageType.JSON.getValue(),&amp;amp;nbsp;
&amp;amp;nbsp; &amp;amp;nbsp; DDMStructureConstants.TYPE_DEFAULT,
&amp;amp;nbsp; &amp;amp;nbsp; context
);&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;But I have no clue on how to get the classNameId. What is supossed to pass there? Is this some constant that I can't find?&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Fabio Carvalho</dc:creator>
    <dc:date>2019-09-18T15:58:14Z</dc:date>
  </entry>
</feed>
