How to execute apex code in developer console

How to execute apex code in developer console : Every salesforce.com user will come to user developer console. Before using developer console we have to understand some basic information about it. How to use developer console, what are the steps to be followed when using developer console, how to execute apex code in developer console, how to create classes, triggers and pages using developer console.

What is developer console in salesforce.com ?

Developer console in salesforce.com is type of development environment which provides set of tools and resources to create, debug, ad test various applications in salesforce.com.

How to open developer console in salesforce.com ?

To open salesforce developer console follow the steps given below.

Go to your name => Click on developer console.

how to open developer console in salesforce

How to execute apex code in developer console ?

Here we look how to execute apex code in developer console. Follow the steps to execute apex code in developer console.

Now go to Debug=>Open execute anonymous window.

How to execute apex code in developer console

Use CTRL + E shortcut to open window to execute apex code.

executing apex code in developer console

 

  • Now click on execute button.

After executing the code, every time log is created. Execution log is created as shown below.

executing apex code in developer console

How check result in developer console  ?

To check the result of the apex code follow the steps given below.

  • After creating code click on execute button.
  • Now a log file will be opened which contains information about many details.
  • If we want to filter the data we have to check different check boxes under the log file.
  • We have different check boxes like this frame, execute, debug, filter.