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
prakashedlprakashedl 

Transaction End Indicator

I am trying to perform some DML operations in a method call. The method will be called very frequently in my application. However, the method is not within a LOOP and nor is the DML. But the method itself will be invoked say 200 times. Obviously, I would be hitting the governor limits. Is there a way to aggregate the values and do one single DML at the end of transaction as opposed to doing it for every single method call?

MandyKoolMandyKool

Hi,

 

I am not sure why your method is getting called 200 times? If it is not getting called in same context, then you will not hit the governors. If it is getting called in same context; could you please elaborate the purpose of your methods and the reason for calling it so many times in same context.