How to execute a piece of code in Apex and view the result? April 21, 2014June 9, 2022Magulan Duraipandian 1. Go to Workbench and select Apex Execute. 2. Enter the code and click “Execute” button to view the result.