When i am running through dataloader with batch size as 100. It is running fine but when i am running like below in developer console, it is giving system.limit exception at one point.

Database.update[(Select id from plan__c)];

Any idea about this behavior, when i am running in develpor console is it mapping to normal behvaior or trigger to 200 batch size.


I guess this is what happening in your case:


When you are loading records through dataloader with batch size as 100, each batch size of 100 is treated as separate transaction. Static variables and limits are reset. You will see logs generated for each load of 100 records in developer console.

Developer Console:

If you run from developer console, limits and static variables(declared outside trigger) are not reset and everything is treated as one transaction. You will see only one log file generated in developer console. But if you have any static variables defined inside the trigger, those are reset between each processing of 200 records.

We need to see your actual trigger code to see why this is happening. If your actual trigger code is too complex to post, please create a simple example and post.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.