Hi, I want to edit metadata of documents from an external application, hence I need to read form structure from share-config-custom.xml. But I can't even get the form configuration. I tried
var formsConfig = config.scoped["cm:content"]["forms"];
var form = formsConfig.defaultForm;
//or var form = formsConfig.getForm("custom-metadata-form");
var visibleFields = form.visibleViewFieldNames;
but I get "Cannot read property \"visibleViewFieldNames\" from null". my config file is regular:
<config evaluator="node-type" condition="cm:content" replace="true">
<forms>
<form id="custom-metadata-form">
<field-visibility>
<show id="cm:name" />
<show id="cm:title" force="true" />
…
Thanks in advance for your help.