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
srikeerthisrikeerthi 

Batch Apex Run in User Mode

Hi

 

Is there any way to change the Batch Apex User Running mode? By default Batch Apex code executes in

System mode, now i need to change it to User mode,Is it possible.

 

If any one know please tell me.

 

 

Thanks

pankaj.raijadepankaj.raijade

you can try "with sharing" key word while defining your class.

 

This will implement sharing rules.

 

 

Shashikant SharmaShashikant Sharma

If the batch is invoked from a with sharing class then it will run in user mode.