Rename the field API via Eclipse/ANT/XML

XML cannot do the renaming of custom field API names. It has to be done in two iterations with following design to achieve the renaming of field API name.

Ex. We will try rename CUSTOM_FIELD__C to CUSTOM_RENAMED_FIELD__c

1. Deployment – 1: Replace with temporary field CUSTOM_TEMP_FIELD__C:
    o Add a field XML for CUSTOM_TEMP_FIELD__C and Replace the CUSTOM_FIELD__C references with CUSTOM_TEMP_FIELD__C.
    o It will create new field and updates all classes.
    o There should not be any other deployments unless Deployment – 2 happens.

2. UI Manual Step : Rename CUSTOM_FIELD__C to CUSTOM_RENAMED_FIELD__C from UI as needed.

3. Deployment – 2: 
    o Add all APEX references to CUSTOM_RENAMED_FIELD__C again.
    o Drop the temporary field CUSTOM_TEMP_FIELD__C (using destructiveChanges.xml).

Comments