I'm using the jsforce node package and I've tried the following:
conn.metadata.retrieve(
{
apiVersion: '38.0',
unpackaged: {
types: [
{
members: ['Contact'],
name: 'Layout'
}
]
}
}
).stream().pipe(fs.createWriteStream('contact.zip'));
Which results in the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Contact</members>
<name>Layout</name>
</types>
<version>38.0</version>
</Package>
I'm not sure where to retrieve all layouts from. I can do it via the describeLayouts()
endpoint, but that seems to exclude the actual layout names which I definitely need.
I referenced this question and turned to the metadata file-based API calls which is shown above. I also did name: 'CustomObject'
but it wasn't part of that response either. Any ideas?