function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SaintMichaelSaintMichael 

Call remote action inside nested class

I have a Controller with a remote action.

I would like to move that remote action to a nested apex class.

Controller1.controller2.remoteAction

Currently, I have the remote action in Controller1:
MemberProfileController.saveMPUPhoto('{!memberProfileUpdateController.account.Id}', function(result, event)

but I want to move it to the nested controller:
MemberProfileController.nestedContrller.saveMPUPhoto('{!memberProfileUpdateController.account.Id}', function(result, event)



How can I access the method, as a remote action, inside the nested class?
This does not work:
MemberProfileController.nestedController.saveMPUPhoto('{!memberProfileUpdateController.account.Id}', function(result, event)

nor does trying to get an instance of it in javascript.
trsmithtrsmith
Well, remote actions must be static and static methods are only allowed in outer classes -- so I don't think that's possible.