function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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.