How to get the list of custom fields in my org which are used nowhere?
I tried to do SOQL query MetadataComponentDependency object using Tooling API to get all component dependency records, but only 2000 records. from that I was thinking to find which custom field is not having any dependency record. but not able to succeed.
below query finds all custom field data in the org
SELECT Id,DeveloperName, Length, EntityDefinitionId, TableEnumOrId FROM CustomField
below query returns only 2000 records.
SELECT MetadataComponentName, RefMetadataComponentName, RefMetadataComponentId FROM MetadataComponentDependency WHERE RefMetadataComponentType = 'CustomField' ORDER By RefMetadataComponentName
Is there any other way or any tool to find which fields have no reference in other metadata?