You need to sign in to do that
Don't have an account?

Lightning Container LCC.callApex Return Error
LCC.callApex('LCCController.getUser', params, this.resultHandler,
{escape: true });
returns error Unable to invoke action 'LCCController.getUser': no controller and/or function found
Here is my Manifest.json
{
"landing-pages" : [
{
"path": "index.html",
"apex-controller": "LCCControler"
}
]
}
Here is the Controller:
global class LCCController {
@AuraEnabled(cacheable=true)
@RemoteAction
global static List<User> getUser() {
UserInfo.getUserId();
List<User> me = new List<User>();
me = [Select FirstName, LastName from User where Id = :UserInfo.getUserId()];
System.debug('Out 7' + me);
return me;
}
}
{escape: true });
returns error Unable to invoke action 'LCCController.getUser': no controller and/or function found
Here is my Manifest.json
{
"landing-pages" : [
{
"path": "index.html",
"apex-controller": "LCCControler"
}
]
}
Here is the Controller:
global class LCCController {
@AuraEnabled(cacheable=true)
@RemoteAction
global static List<User> getUser() {
UserInfo.getUserId();
List<User> me = new List<User>();
me = [Select FirstName, LastName from User where Id = :UserInfo.getUserId()];
System.debug('Out 7' + me);
return me;
}
}
Change your apex class controller as below and remove @RemoteAction

I made the change, but still get the same error.
try this

Still get same error