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
Sunil PalSunil Pal 

Remote action passing values

Hi All

I have two remote action method on controller side say method1 and method2. I am creating a list in method1 and the return type  is void now form other action I am calling method2 where I need to return the list which I have created in method1. On the nutshell I need to that list which is created in method1 in method two. And method1 is not having retrun type.  If it is not possible then any alternate for this scenario. Please suggest If anyone have any idea, it will be very usefull.
Boman@imtBoman@imt
Remote Action methods are static, and as such can only access static variables to store state. Apex controllers do not maintain static variables, and therefore your call to method2 will not see the list (which you definitely have defined as a static!) you had stored away in method1.