Developer console exercises

We'll be using the developer console throughout this book, so it is necessary that you become familiar with it. The following are some exercises to help you familiarize with the consoles development features:

  • Create a class: Using the developer console, create a new class and give it the name DevConsoleExample. Ensure that the class compiles without errors.
  • Run a SOQL query: Run a SOQL query from the query editor, that finds all the opportunities that are on the closed/won stage.
  • Execute anonymous: Run the following code block in execute anonymous window:
    System.assert(1, (1/0), 'should throw an assertion error');
  • Log viewing: Having run that snippet of Apex in the developer console, navigate to the Logs tab and open the ...

Get Mastering Application Development with Force.com now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.