Posts

Showing posts with the label EXECUTING ANONYMOUS APEX INSIDE ECLIPSE

EXECUTING ANONYMOUS APEX INSIDE ECLIPSE

Image
One of the most underutilized programming techniques in Force.com is the ability to execute a snippet of apex code "anonymously". I know, it has a funny ring to it. Anonymous code is basically just a block of code that doesn't get stored inside Salesforce.com. This is nice, because often times you just want to try part of a method out or execute a SOQL statement without going through the hassle of adding it to a trigger or a class. This is a great technique to quickly evaluate or debug a statement of code on-the-fly. There are a couple of ways you can do this. Open up the Developer Console inside Salesforce The executeAnonymousWeb services API call Inside Eclipse/Force.com IDE I typically do this inside Eclipse so I thought I would quickly highlight how to do that and include a screenshot as a guide. When you have the Force.com IDE plugin installed in Eclipse, all you have to do is navigate to the Execute Anonymous tab. If you don't see the tab, make sure you've g...