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
Dchris222Dchris222 

Too many script statements

Run Failures:
  OppPoliceSchedulerTestClass.testOppPoliceScheduler System.DmlException: Update failed. First exception on row 1000 with id 0063000000kF2uuAAC; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, oppUpdateInventoryInfo: execution of AfterUpdate

caused by: System.LimitException: Too many script statements: 200001

Trigger.oppUpdateInventoryInfo: line 18, column 4: []


 

I don't understand how to fix this error. Do I need to go through this code that has allready been deployed and eliminate scripts?

Shashikant SharmaShashikant Sharma

There is a limit for script statement, you must be having cyclic trigger where one trigger update any object which agaign starts another trigger and this goes on. Please share your code, it would be easier to figure out f there is wrong with code.

Ankit AroraAnkit Arora

You must be using for loops in your code which may causing this error. So your code here will help us to assist you more.

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page