Find your content:

Search form

You are here

Changing the api name of a custom object


I have created an object,created fields in it and wrote all visualforce pages and classes. Although I have changed the name of the object its API name has not changed. I want to change the API name as well. I don't want to create a the object again from scratch as it has a lot of fields in it.

What steps should I take to change the API name....

Object__c to Object1__c

Attribution to: Eagerin Sf

Possible Suggestion/Solution #1

Assuming it isn't a released/managed Object, you can change the Objects API name by clicking Edit (Setup->Create->Objects) next to the Object:

enter image description here

Then, simply type in a new name and hit save:

enter image description here

It will probably warn you about making changes to names for existing integrations, but assuming you're ok with that just ignore. If you have dependent classes that reference the object, you will need to 'un-reference' it first before you can change it.

For example, in the example below I would need to go into all of these classes etc. and remove any reference to the DocumentSequenceNumber__c object:

enter image description here

Attribution to: Phil Hawthorn
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content