Visual Studio Code Tips – Execute Anonymous Apex in Visual Studio Code
This post & video explained about to Execute Anonymous Apex in Visual Studio Code, also covered the following topics:
– Execute Anonymous Apex in Developer Console
– Execute Schedulable Apex in Developer Console
– Execute Anonymous Apex in Visual Studio Code
– Execute Schedulable Apex in Visual Studio Code
– Monitor Scheduled Jobs in Salesforce (Setup -> Jobs -> Scheduled Jobs)
From Scripts Folder -> Apex -> Create a folder with extension as .apex (you can create many files and use it whenever needed in your project)
From Command Palette (Ctrl+Shift+P) -> Type Execute Anonymous and Select “SFDX: Execute Anonymous Apex with Currently Selected Text”, results appear in the Output panel as highlighted below screenshots
Please check the below video for more info about to Execute Anonymous Apex in Visual Studio Code: