You need to sign in to do that
Don't have an account?
Akhil Katkam 5
why apex is not calling from controller method
Hi Developer Community,
I was not able to find why my apex is not calling from controller method ,
can anyone please tell me the reason for this
I was not able to find why my apex is not calling from controller method ,
can anyone please tell me the reason for this
Greetings!
Maybe the syntax you are using is not correct.
If you are using in Lighting Component, Refer to this-
http://amitsalesforce.blogspot.com/2018/08/invoke-apex-from-lightning-component.html
and If you are using Lightning Web Component (LWC), refer to this-
https://www.sfdcblogs.com/post/call-apex-from-lwc
Please mark it as the best answer if it helps you to fix the issue.
Thank you!
Regards,
Suraj Tripathi
Thanks for the response ,
please check my code below
request1 : function(component, event, helper) {
var recId = component.get("v.selectedId");
alert('hi');
// var recordId =component.get("v.recordId");
var action = component.get("c.fetchCompetitions");
action.setParams({
"recordId" : component.get("v.recordId"),
"recId" : recId
});
$A.enqueueAction(action);
}
CAn you please share you component (.cmp) file code, that's would be eaisr to trace the issue.
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh