When I go to the list of User Page Layouts
, I see that there are three different User layouts available in my organization
Page Layout Name
User Layout
User Profile Layout
Community Member Layout
However, when I try to use package.xml with the following body,
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>User-User Layout</members>
<members>User-User Profile Layout</members>
<members>User-Community Member Layout</members>
<name>Layout</name>
</types>
<version>45</version>
</Package>
I receive an error saying
Retrieve warnings (2):
package.xml - Entity of type 'Layout' named 'User-Community Member Layout' cannot be found
package.xml - Entity of type 'Layout' named 'User-User Profile Layout' cannot be found
Usually a layout has the object developer name with hyphen symbol appended as a prefix to layout name when it is needed to retrieve it by Ant, at least the first layout is retrieved successfully, however, two other layouts are not.
Even if I change prefix to User Profile
or to Community Member
, it doesn't work, even when I try to use package.xml with the following body,
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>User-User Layout</members>
<members>User Profile-User Profile Layout</members>
<members>Community Member-Community Member Layout</members>
<name>Layout</name>
</types>
<version>45</version>
</Package>
and it returns the same error
Retrieve warnings (2):
package.xml - Entity of type 'Layout' named 'Community Member-Community Member Layout' cannot be found
package.xml - Entity of type 'Layout' named 'User Profile-User Profile Layout' cannot be found
Best Answer
It is possible to use
sf:listMetadata
targetto find out the names for the exotic page layouts. If this target is used, the
profiles.txt
can be examined to search the required names.Actually it contains the required names.
These names can now be used to retrieve the layouts metadata