+ Start a Discussion
Leonard CadetLeonard Cadet 

Lightening Component to execute Apex code

I have Apex Code that I execute in the annoymous block that completes a task for me. 

We are in lightning and I want to create a button that that a user can click to execute the apex code. 

I believe I need to create a lightning component to call the apex code. 

What are the stand steps that I can follow for this process? I've been looking for documention and best practice but I'm not sure what to follow to accomplish this.