Access Documents and Media Custom Metadata field programmatically?

thumbnail
Jamie Sammons, modified 3 Years ago. New Member Posts: 12 Join Date: 10/28/19 Recent Posts

Hi,

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 "documentCategories". 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.

In 6.2 we were using, field.getFieldMap() to get the metadata fields but that has been deprecated long back.