#JS_Alternatives In Salesforce Classic Custom Button, we have javascript invokes Apex Class by sforce
.apex.execute, used twice in a single custom button script with invoking the 2 different custom global classes.
One for validation and other to invoke the web service.
1) How can this be achieved in Lightning Actions?
2) Is it possible to refer 2 controllers (Apex Classes) in a single Lightning Component Action?
Hi Magesh,
The best way to achieve this is to create a lightning component and use it as a quick action, but you can only use one controller, if the validation it's about input data, you can validate it in the javascript controller of the component, and then you call the apex controller.
Here is an example on how the lightning components as quick action work
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_using_lex_s1_config_action_recordid.htmHope this can help you