+ Start a Discussion
kpravn221.3890878017213708E12kpravn221.3890878017213708E12 

how to get .object file for a custom object

AmulAmul
use this https://workbench.developerforce.com/
kpravn221.3890878017213708E12kpravn221.3890878017213708E12
Hi Amul ,

 Thanks for your reply but how can i generate the related xml file( .object file for each object ).
Sonali_takkeSonali_takke
Hi  kpravn221.3890878017213708E12,

You can use Salesforce Package.xml Generator Extension for VS Code (https://marketplace.visualstudio.com/items?itemName=VignaeshRamA.sfdx-package-xml-generator)  to generate the xml file for custom objects using VS Code IDE.
Nicolas KadisNicolas Kadis
If you're using sfdx and your project is in source format, you can fetch all your custom objects using 
sfdx force:source:retrieve -m CustomObject

To retrieve a specific custom object use
sfdx force:source:retrieve -m CustomObject:Custom_Object_Name__c

If your project is in metadata format, then you can create a package.xml file using this sample (for more samples see here (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/manifest_samples.htm))
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>MyCustomObject__c</members>
        <name>CustomObject</name>
    </types>
    <types>
        <members>*</members>
        <name>CustomTab</name>
    </types>
    <types>
        <members>Standard</members>
        <name>Profile</name>
    </types>
    <version>47.0</version>
</Package>
You can then use
sfdx force:mdapi:retrieve -r <retrieveTargetDirectory> -u <username> -k ./package.xml
where <retrieveTargetDirectory> is the directory you want your retrieved .zip file (containing your objects) to be saved at.

Hope that helps :)

Nicolas Kadis