Activity › Forums › Salesforce® Discussions › When to use the Database.Stateful in Salesforce? Salesforce® Discussions When to use the Database.Stateful in Salesforce? Posted by Shweta on January 22, 2020 at 3:11 PM When to use the Database.Stateful in Salesforce? Deepak replied 6 years, 4 months ago 2 Members · 1 Reply 1 Reply Deepak Member January 22, 2020 at 3:28 PM Hi Shweta, Database.Stateful is used when the execute method modifies a class variable in such a way that it is to be used across multiple execute methods or in the finish method. Hope it helps! Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me