[SalesForce] Easy method/tool for determining unassigned page layouts

Poorly maintained SF instances can end up with a lot of clutter: case in point, page layouts. In my new org there are dozens for each object, along with dozens of record types. Many are outdated and unused, but were never cleaned out by the former admin.

My process for cleaning out old layouts has been cumbersome and manual: I compare the list of layouts against the layout assignment page in salesforce, carefully navigating across the table and searching to see if a given layout was assigned to any profiles for any record types, then deleting it if it isn't.

I'm surprised my searches for tools/solutions around this have been so unfruitful, since I imagine this is a common experience.

Anyone know of any tools, or a way to programatcially determine which page layouts haven't been assigned to any profiles?

Best Answer

My solution was to use metadata files for profiles.

  1. Get access to Salesforce metadata. You can do this using the metadata API directly, or indirectly through pulling metadata files via an IDE like Eclipse or MavensMate

  2. Get metadata for profiles and for layouts. The layouts metadata provides you a full list of page layouts across all objects, while the profile files contain the info on which page layout/record type combos the profile is associated with.

  3. Compare the profiles' assignments to page layouts to the list of page layouts. I did this using some scripting code which parsed through the xml files.

Related Topic