Define Apex Classes
- From Setup, enter Apex Classes in the Quick Find box, then select Apex Classes.
- Click New.
- Click Version Settings to specify the version of Apex and the API used with this class. If your organization hasinstalled managed packages from the AppExchange, you can also specify which version of eachmanaged package to use with this class. Use the default values for all versions. This associates the class with the most recent version of Apex and the API, as well as each managed package. You can specify an older version of amanaged package if you want to access components or functionality that differs from the mostrecent package version. You can specify an older version of Apex and the API to maintain specific behavior.
- In the class editor, enter the Apex code for the class. A single class can be up to 1 million characters in length, not including comments, test methods, or classes defined using @isTest.
- Click Save to save your changes and return to the class detail screen, or click Quick Save to save your changes and continue editing your class. Your Apex class must compile correctly before you can save your class.