I'm in a situation where I have a Screen flow that is called when an action button is clicked on an opportunity, some data is input, and then that data is pulled into an Apex class.
I understand that a Screen flow can't be called from an Apex class (although I wish that would be changed) but is it at all possible to call an Apex class from a screen flow? The issue is that there is specific information that needs to be pulled in from the user first before the class is called, and I'm trying to figure out a way to do this without building out a fully custom visualforce page.
Currently, this is the process I'm hoping to achieve:
- User/Sales Rep clicks 'Void Contract' action on the Opp.
- User is taken to a screen flow where they enter the type of void they want to perform (SelectedVoidType), and a new total value for a sales rep's commission (newQR).
- My apex class is called after the screen flow finishes that receives those 2 new variables, and updates some records and some other miscellaneous actions from there.
Is this process possible with what I'm looking to do? (i.e. screen flow --> apex class) If so, I would love some clarification/guidance on how I can proceed with it. Thank you!