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
salesforcerrrsalesforcerrr 

Test class continuation issue using @Remote

My problem is getting code line test on the callback(Object state) class for the continuation using @RemoteAction. There are a lot of test class example on callback(), but none on callback(Object state), and I can’t figure out how to pass the State object in the class for continuation.

When I use Test.setContinuationResponse and Test.invokeContinuationMethod to test @RemoteAction
public static Object callService(), the apex compiler is reporting an error 'System.TypeException: No method 'callback()' on provided controller type.' it looks like system can't realize the 'public static Object callback(Object state)', which has a parameter Object state. in order to verify this, I try to add a new 'public static Object callback() in controller, yes, compiling pass. however I really want to callback(Object state) instead of callback(), so my quesstion is, How to set ContinuationMethod so that compile can realize the public static callback with parameter 'Object state'?

Thanks
Raj VakatiRaj Vakati
can you share the cod e? i will write it for you
Ashwin KcAshwin Kc
Hi @Raj
I am also struck with this issue, couldn't find documentation related to this, it will be great if you share code snipet to cover  'Object state' or you can guide us to any documentation 

Looking forward to hear from you 
Thanks