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
cptcpt 

how to pass both Object and string in Apex.execute() method as a params

consider the inputs:

 

var currentSession:String=loginSession;                 
 var b:Object =loginObject;

Now i can pass inside the   .apex.execute("","params,"") asyncronously can any one help me ....

Imran MohammedImran Mohammed

If you are talking about execute method of Batch Apex, then you cannot do this way.

You have to implement database.stateful interface on your class which will help in maintaining the states.

In your case you have to declare two global variables in the Batch class and assign the values to these variable when you create instance of the class.