<?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>Access Documents and Media Custom Metadata field programmatically?</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121443384" />
  <subtitle>Access Documents and Media Custom Metadata field programmatically?</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121443384</id>
  <updated>2026-04-05T10:45:57Z</updated>
  <dc:date>2026-04-05T10:45:57Z</dc:date>
  <entry>
    <title>Access Documents and Media Custom Metadata field programmatically?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121443383" />
    <author>
      <name>Kaustabh Sinha</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121443383</id>
    <updated>2022-06-16T15:23:28Z</updated>
    <published>2022-06-16T09:46:05Z</published>
    <summary type="html">&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I'm currently using Liferay DXP 7.4 environment which is in between
  migration from 6.2 environment in our project. There are documents and
  media file entries that have a custom document type which uses a
  custom metadata set (a dropdown field with given values) by the name
  of &amp;quot;&lt;strong&gt;documentCategories&lt;/strong&gt;&amp;quot;. I want to
  understand how to programmatically get this dropdown metadata field
  and its values. I have a dlFileEntry object with me. Please let me
  know what is the step by step logic and what would be the code to get
  the same.&lt;/p&gt;
&lt;p&gt;In 6.2 we were using, field.getFieldMap() to get the metadata fields
  but that has been deprecated long back. &lt;/p&gt;</summary>
    <dc:creator>Kaustabh Sinha</dc:creator>
    <dc:date>2022-06-16T09:46:05Z</dc:date>
  </entry>
</feed>
