2

I am trying to do analysis on the number of fields comparing 2 different page layouts and Could not find an easy way to count the number of fields added to a page layout. Would anyone be able to assist me? I attempted to copy all of the fields and paste it into notepad which didnt work well.

2

You could use the describeLayout() API method to pull details about the page layouts for an object.

Drill down into the returned DescribeLayoutResult to find the DescribeLayoutComponents with the LayoutComponentType/type of Field. The value will be the name of the field being used on the page layout.

2

One option might be to load up your project in the Force.com IDE, making sure that you select Layouts in the metadata when creating a project:

http://wiki.developerforce.com/page/Force.com_IDE

Once your project is created select both layout files, right click and Compare To each other to get a diff between the two files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.