Activity Forums Salesforce® Discussions What is stateful and stateless in Salesforce?

  • Pooja

    Member
    July 27, 2020 at 6:42 am

    <div>If your batch process needs information that is shared across transactions, one approach is to make the Batch Apex class itself stateful by implementing the Stateful interface.

    </div><div>Batch Apex is stateless by default. That means for each execution of your execute method, you receive a fresh copy of your object. All fields of the class are initialized, static and instance.

    </div>

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos