How do I define page layout assignments for different record types via metadata XML files?

1 Answer 1


Going by what the Migration Tool produces, these are stored in the profile definitions. Here's an example from one of my org's profiles:

<?xml version="1.0" encoding="UTF-8"?>
<Profile xmlns="http://soap.sforce.com/2006/04/metadata">
  <!-- Field permissions --> 
  <!-- Layout Assignments
  <!-- object permssions -->
  <!-- Record Type visibilities -->
  <!-- Tab Visibilities -->
  <!-- User license -->
  • Argh, the pain of getting the profiles too. Thank-you :)
    – Baxter
    Aug 23, 2012 at 16:39
  • 2
    They're not too bad; you can either hand code the package.xml file (which I did since our org is still new and not overly complex) or use the Force.com IDE to generate the XML. Once you have that the ANT makes it super simple to retrieve and deploy.
    – Mike Chale
    Aug 23, 2012 at 16:45

You must log in to answer this question.

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