---
schema_version: "1"
id: a318e8197db0f819eada777b4cdf095e1f548ac6cf34831dc9cc17da4c073516
title: Create a New Apex Class
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/cme/guides/comms-create-a-new-apex-class.md
canonical_url: https://developer.salesforce.com/docs/industries/cme/guide/comms-create-a-new-apex-class.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 052fafaada822978df5be17bcfb7224fb0b36c8436d94a0459170a1721c46032
products:
  - Communications, Media, Energy and Utilities APIs (Managed Package)
  - Industries Developer Documentation
---
# Create a New Apex Class

In this task, Felix needs to create a new Apex class to inject logic for the new custom field – Billing Zip Code. Without this logic the new custom field will not populate.

1.  Navigate to the **Setup** icon and select **Developer Console**.

2.  From the **Developer Console**, click **File > New > Apex Class**.

3.  Name the Apex Class `CpqAppHandlerHookImplementation` and click **OK**.

4.  Click [here](https://volt.my.salesforce.com/sfc/p/o0000000IKm8/a/3m0000005upo/e5fxAdKe2n4qwyxNK2u8_0.32vNJ9pPUWfbdVrHGfEc) to download the `CpqAppHandlerHookImplementation.txt` file.

5.  Paste the code from that file in the **Enter Apex Code** box. You will have 48 lines of code.

    ![](https://developer.salesforce.com/docs/media/image90.png)

6.  Click **File > Save**.

7.  Review line 12. Note the `String customFields` API.

8.  Close the Developer Console.

See [Create the CpqAppHandlerHook Implementation](https://developer.salesforce.com/docs/industries/cme/guide/comms-create-the-cpqapphandlerhook-implementation.md).
