1

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?

1 Answer 1

0

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.

3
  • I am interested in identifying unused page layouts in my org. Could you share your scripting code or how you identified unused page layouts please in your org? Commented Apr 9, 2017 at 19:07
  • @Buyan I don't have whatever scripting I used saved, but I do say how to identify unusued page layouts in the answer you commented on. Thats what steps 1-3 are. Where exactly are you stuck?
    – smohyee
    Commented Apr 10, 2017 at 21:42
  • 1
    Just thought of updating this thread although it's an year old one. Currently, we can use Salesforce Optimizer to know which page layouts are unassigned. This is straight forward and can be easily used by Admins as well. And it is available in Professional, Enterprise, Performance, Unlimited, and Developer Editions. Please see the below link for more details on this. help.salesforce.com/…
    – Karthik
    Commented Jun 11, 2018 at 15:07

You must log in to answer this question.

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