+ Start a Discussion

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?




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.