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
NallapatiNallapati 

How to deploy standard field "Name" of an object from one sandbox to other Using ANT Migration tool

I want to deploy "name" field of a custom object from one sandbox to other sandbox. The object is already in both sandboxes. I tried using ANT tool.

 

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>COB__c.Name</members>
 <name>CustomField</name>
</types>
<version>24.0</version>
</Package>

 

I got the below error : 

 

Error: package.xml(COB__c.Name):An object 'COB__c.Name' of type CustomField was named in package.xml, but was not found in zipped directory

 

 

I have tried extracting the complete object but ANT is not extracting the "Name" filed.

<types>
<members>COB__C.Name</members>
 <name>CustomObject</name>
</types>

 

 

Please suggest how to do this

b-Forceb-Force

Try to deploy only object , without any fields , It will deploy onject byDefault information , 

 

Thanks,

bForce

LegendLegend

Hi,

 

You can use the  below code:

 

    <types>
        <members>COB__c</members>
        <name>CustomObject</name>
    </types>

 This will move the whole object from one sandbox to another.

ccusic1ccusic1
Add a destructiveChangesPre.xml file to your deploy folder and put that VF Page in there and in your package.xml.  

The destructiveChangesPre file will remove the VF Page before executing your deployment to get rid of the dependency.  After that, the package.xml file will deploy the controller successfully, then deploy the updated VF page.