Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can somebody please suggest me what is the best way i can rename custom object name when it is referenced in class and triggers.

share|improve this question
Do you want to change only the label of the object or also the API Name ? – apn Aug 18 '14 at 19:53
up vote 5 down vote accepted

The API Name? That's never easy. I typically have to comment out all the references to it in the code, change the name and then uncomment the code. You'll then have to redeploy all that code to your production org.

share|improve this answer
Salesforce is nice enough to stop you from destroying your code, not nice enough to refactor your code in real time. – sfdcfox Aug 19 '14 at 1:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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