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
Pratik KumarPratik Kumar 

Possibility of having a variable that can retain value throughout transactions

Can I have a variable, specifically a Map, that retains its value globally throughout all transactions until and unless it is modified through apex or flows or triggers?
Ashish DevAshish Dev
No for apex variables it is not possible.
User Custom settings or Custom object to hold values of variables.
Tarun J.Tarun J.
Are you looking for static variable?