Print this page

Can I name my custom object same as standard object like opportunity?

Knowledge Article Number 000193606
Description I noticed I can name a custom object using standard object names like Account, Opportunity, etc. 

Will it cause any issue?
Resolution As a best practice, it is not recommended to use standard object names for custom object. 

It will cause issues or unexpected behaviour.

Eg:
1. If a standard object and custom object have matching names or labels, only the standard object's fields display when you select from Available Merge Fields.

2. If you name a custom object as Opportunity, and create a tab for it.


When you go to Setup - Customize - Tab Names and Labels - Rename tabs and labels, go to this custom tab, and click Edit and then Save without changing anything, you will get error:
Error: You cannot reuse a standard salesforce.com name.

Or if you simply click Reset, you will get error:
Enter the new tab names and field labels to display in the selected language.


3. If a developer package above custom object(Opportunity) and then install the package in a subscriber org, the subscriber will experience same issue as above.

So to avoid issues like above, it is not recommended to use standard object names for custom object.

 




promote demote