+ Start a Discussion

Listing fields that appear to be not used

Hi all,

First message on this board, be gentle. =)

We have a lot of custom fields all over our org, in different objects, both standard and custom ones, that I suspect to be not used. Either not used anymore, or has never been used, just put in to "test something" by a previous admin.

Do you guys have any tips on how to create a listing of some sort to see for example:
  • Fields with no data
  • Fields with very little data
  • Fields that are not on any page layouts
Would this be possible via an S-Control or would I be better off looking at creating a stand-alone Java (or similar) program? Any other ideas?

Thanks in advance!

//Johan Liljegren
I think there's a feature request for that, but you could do something similar to the following:

Call describeGlobal to get a list of objects.
Call describeSObjcets to get a description of each page layout/object.
For each Object...
  Call "select count() from object" to get a total record count.
  Call "select count() from object where field = null" for each field to get a usage percentage (some fields, like checkboxes, would have a special syntax, like "field = false").
...Repeat per object.
Show the results on the screen.

Note that you'd have to run the script only after ensuring that ALL fields are visible to the user running the script (because the field level security will stop even admins from seeing fields not visible to them at the profile level). I almost once wrote something like this, but it got put on the backburner. I might write something up like this if I get the time, and post it here.