How can I fetch the visible(Display on End-User Side) ID and Label of the custom fields?
Recently, we have upgraded the CX to the May 2015 Version and migrated the CP2 framework to CP3.
In the old version, we have a custom script with a MySql query with objects (tables) 'custom_fields', 'labels' and 'visibility' would fetch the visible (Display on End-User Side) Custom Field ID and its Label.
But, the above mentioned objects are not exposed in the new version.
I tried by using the getMetadata() function in the new custom script, but it shows all the incident custom field Labels regardless of the visibility and not showing the ID.
How can we fetch the ID and the Label of the custom field and restrict the result by using visibility.