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
Sri Neelima reddySri Neelima reddy 

how to get the custom objects and custom fields of account object to retrieve form the org

how to get the  custom objects and custom fields  of account object  to retrieve form the org


what will be the package.xml file
Thanks and Regards
Sri Reddy
 
Nayana KNayana K
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>CustomField</name>
    </types>
    <types>  
        <members>Account</members>   
        <name>CustomObject</name>  
    </types>
    <version>51.0</version>
</Package>

Above package xml should return account object detail and it's custom fields.

Below package.xml should return account + other custom objects and their custom fields.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>CustomField</name>
    </types>
    <types>  
        <members>Account</members> 
         <members>*</members>    
        <name>CustomObject</name>  
    </types>
    <version>51.0</version>
</Package>

Give it a try.
Sri Neelima reddySri Neelima reddy
hi nayana, 
  
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>CustomField</name>
    </types>
    <types>  
        <members>Account</members>   
        <name>CustomObject</name>  
    </types>
    <version>51.0</version>
</Package>

here , iam getting both the customfileds and custom object, how can retrive only customfields throught the package.xml file, any idea



can i get  the standardobjects realated to account, 
 
<types>  
        <members>Account</members>   
        <name>StandardObject</name>  
    </types>

iam using this, is this a correct approach, 

Thanks and Regards
sri reddy