You need to sign in to do that
Don't have an account?
Rakesh S
showing error like "Component is not defined" in Lightning
Hello,
I'm trying to delete an account whenever clicking on the delete button(lightning button). I'm passing the selected account name to Helper where i want to call apex method by passing the parameter.
the follwing error getting while doing the delete operation.
Please help me to define component.
Thanks,
Rakesh
I'm trying to delete an account whenever clicking on the delete button(lightning button). I'm passing the selected account name to Helper where i want to call apex method by passing the parameter.
Helper: ({ deleteAccounts: function(accountName){ console.log('accountName: ',accountName);// getting name here- Test Account var action = component.get('c.deleteAccounts'); action.setParams({ "accName": accountName }); } })
the follwing error getting while doing the delete operation.
Please help me to define component.
Thanks,
Rakesh
Greetings to you!
Firstly, you need to call the helper method from the controller that deals with the rest of the code with proper parameters.
Then in helper create the function and use the parameters from the controller to construct your function.
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
and change the declaration of helper method as