Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Access Documents and Media Custom Metadata field programmatically?
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.