---
title: "Don't name classes after System classes"
url: "https://blog.beyondthecloud.dev/tips/dont-name-classes-after-system-classes"
category: "Apex"
published: "2024-04-02"
---

# Don't name classes after System classes

Each defined object, custom or standard, is automatically represented by its own apex class.

### Do not create classes using standard object names!

It might be tempting to create class like this:

![Don't name classes after System classes — screenshot 1](https://blog.beyondthecloud.dev/tips/dont-name-classes-after-system-classes/fig-1.webp)

This will lead to unexpected results.

Each defined object, custom or standard, is automatically represented by its own apex class.

When we overwrite this default class, each existing or new reference is replaced by the new class, which is usually lacking a lot of implementation.

In the best-case scenario, you will see something like this:

![Don't name classes after System classes — screenshot 2](https://blog.beyondthecloud.dev/tips/dont-name-classes-after-system-classes/fig-2.webp)

In the worst-case scenario, your entire Salesforce instance might have problems operating!
