Apex:
global with sharing class SomeClass {
@RemoteAction
@AuraEnabled(Cacheable=true)
global static Id someMethod() {
return u.Id;
}
}
VF:
<apex:page controller="SomeClass">
...
<script>
...
Visualforce.remoting.Manager.invokeAction(namespace + 'SomeClass.someMethod', () => console.log("success"))
</script>
</apex:page>
This is the essence of what I'm trying to accomplish in my code, but I'm getting the following warning and error respectively:
Controller not found for 'namespace__SomeClass'
Unable to invoke action 'namespace__SomeClass.someMethod': no controller and/or function found
This works in my unmanaged package but does not work in my managed package. Does anyone know what might be going wrong?
invokeAction('{!$RemoteAction.namespace.SomeClass.someMethod}'
instead?