You need to sign in to do that
Don't have an account?
Priyanka Dumka
How we can pass the parameter if we calling batch from another batch (from finish method)?
How we can pass the parameter if we calling batch from another batch (from finish method)?
To pass parameters from a Salesforce batch class to another batch class, you can use the Database.executeBatch method with the appropriate constructor signature to pass the parameters.
See https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_database.htm#apex_System_Database_executeBatch
Example:
>> Consider below as 2nd batch class
>> In the first batch class, create an instance of the second batch class with the parameters you want to pass:
See related: https://salesforce.stackexchange.com/questions/155940/passing-parameter-from-one-batch-apex-into-another-batch-apex
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm
If this information helps, please mark the answer as best. Thank you