Skip to main content

Invoke and Test the Code

Run the Code

An anonymous block is Apex code that does not get stored, but can be compiled and executed on demand right from the Developer Console. This is a great way to test your Apex Classes or run sample code.

  1. In the Developer Console, select Debug | Open Execute Anonymous Window.
  2. In the Enter Apex Code window, enter the following:
    OlderAccountsUtility.updateOlderAccounts();
    
  3. At the bottom right, click Execute.
Keep learning for
free!
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities