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
Taha HaiderTaha Haider 

How to import everything from account object only?

How to import everything from account object only?
By CLI salesforce (package.xml file)
ANUTEJANUTEJ (Salesforce Developers) 
Hi Taha,

To import metadata regarding the account object you can use the below package.xml in conjunction with sfdx or ant.
 
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>Account</members>
        <name>CustomObject</name>
    </types>
    <version>51.0</version>
</Package>

To import all the data you can use data loader.

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Thanks.
Taha HaiderTaha Haider
From this,will it retrieve all data from account object? 
i mean custom fields,page layouts etc etc.

Thanks in advance
ANUTEJANUTEJ (Salesforce Developers) 
So when you retrieve the details using the above package.xml, you would be getting the details regarding the object these details are the once that are describing the object.

>> https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/customobject.htm?search_text=enablefeeds

The above article has a table with the list of values you would be getting on retrieving the object.

you can try retrieving using the package.xml with sfdx, you can follow the below article to get the step by step instructions of how to do it:
>> https://salesforcediaries.com/2019/09/09/xml-package-to-retrieve-metadata-from-org/#:~:text=xml%20file%20in%20a%20sfdx,defined%20in%20xml%20package%20file.

To fetch layouts you can try this below link: 

>> https://salesforce.stackexchange.com/questions/241475/how-to-add-any-specific-objects-page-layout-in-package-xml

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Thanks.