7

I have a field in two sandboxes with the same ID (they both came from production). The field is on the Opportunity

Let's call them sandbox1 and sandbox2.

I changed the API name of the field in sandbox1 (along with some apex references).

But when I deployed the change set from sandbox1 to sandbox2, instead of changing the API name in sandbox2 to match the API name in sandbox1, it created a new field with the changed API name and left the old field intact and unchanged.

Is it possible to rename API names of fields with change sets? Or will is always create a new field when I move it from one environment to another?

7

The API names are, in a matter of speaking, the unique Id's for your metadata. If you change the API name in sandbox 1, sandbox 2 has no idea that you did that. So when you move the metadata to sandbox 2 it thinks it is a new field.

So to answer your question. No you can not rename API names with change sets.

If you need to do something like that I would suggest using the force.com ant migration tool to first delete the old field then insert your new(renamed) field.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.