You need to sign in to do that
Don't have an account?
sandeepathadu
hi help for too many script statements error
hi i have wriiten a code which contains 6 insert statements it is working fine for me in sandbox but when we are doing migration its failing and giving too many script statements please help me resolve this issue
Can you please post your code here. Do you used any List<object> ? or DML In for ?
yes i have used many lists
here is my code
As I see your code is not that huge to get Such an error,
I wold suggest you to Initialize an object As 2nd method:
That will reduce much of script statements.
I have observed that in your code your using reduent code, instead of that use function with parameters. which will reduce the duplicate code.
This code is repeated in all the conditions.
or else just follow as Rahul suggested.