1

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?

2 Answers 2

0

You can try using FieldTrip free app exchange app . The Field Trip helps analyze and report on which fields from which object in your organization are used consistently and which fields are left unused. The Field Trip report provides the percentage of utilization of each field. Thus, with the help of the field utilization report results, we can delete the fields which are not in use.

Let’s get into what Field Trip comprises of and how it works.

Field Trip mainly comprises of two objects namely,

  1. Field Trip

  2. Field Analyses

In the Field trip object, the user can give the name for field analysis, object API name and the criteria to filter the field for the record. Thus, it will list all the custom and standard fields of the selected object. It also provides the information of the percentage of the field utilization along with record count.

Hope this Helps !

1
  • 1
    I don't think this I what OP requires. Op wants to see fields which are likely not used in code or anywhere from metadata perspective. I think fieldtrip is to see in how many fields have the data so you can cleanup unused fields. While I'm sure this would indeed be needed once OP identifies the fields and wants to cleanup.
    – manjit5190
    Jun 18, 2023 at 6:46
-1

Salesforce Optimizer would tell you; I think without having to install something from App Exchange.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .