function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
M UmerM Umer 

VSCode: Unable to fetch Case Layouts in using package.xml

I am connected to a Test sandbox org and using vscode, I am trying to fetch the Case Page Layouts metadata but unable to fetch. I tried with wildcard as well as with specific Layout name but nothing has worked so far. This is how my package.xml looks like:
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
	<types>
		<members>*</members>
		<name>ApexClass</name>
	</types>
	<types>
		<members>*</members>
		<name>ApexComponent</name>
	</types>
	<types>
		<members>*</members>
		<name>ApexPage</name>
	</types>
	<types>
		<members>*</members>
		<name>ApexTestSuite</name>
	</types>
	<types>
		<members>*</members>
		<name>ApexTrigger</name>
	</types>
	<types>
		<members>*</members>
		<name>AuraDefinitionBundle</name>
	</types>
	<types>
		<members>Case</members>
		<members>CaseContactRole</members>
		<name>CustomObject</name>
	</types>
	<types>
		<members>*</members>
		<name>LightningComponentBundle</name>
	</types>
	<types>
		<members>*</members>
		<name>Profile</name>
	</types>
	<types>
    	<members>Case-Case Layout</members>
		<name>Layout</name>
	</types>
	<types>
		<members>*</members>
		<name>StaticResource</name>
	</types>
	<version>50.0</version>
</Package>

Any idea how to fetch the page layouts for the case?

User-added image
only these layouts are coming over but not sure what are these as can't see them in the application.
 
Best Answer chosen by M Umer
M UmerM Umer
I found the issue which is by mistake I authenticated this org with my dev org and as you can see the layouts that are fetched are from Dev org. I reauthenticated my org with the test org and issue is fixed.

All Answers

AnudeepAnudeep (Salesforce Developers) 
There are several ways to retrieve it. One option is to use the org browser 

Or you can use the extension listed in this post

Also, can you try this? 
  • Create a Project with Manifest
  • In the package.xml, specify the layouts (make sure you have it in package.xml), example as below:
<types>
    <members>*</members>
    <name>Layout</name>
</types>

Execute SFDX: Retrieve Source in Manifest from Org

User-added image

Or you can use sfdx commands

sfdx force:source:retrieve -m Layout

Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you
M UmerM Umer
I found the issue which is by mistake I authenticated this org with my dev org and as you can see the layouts that are fetched are from Dev org. I reauthenticated my org with the test org and issue is fixed.
This was selected as the best answer